mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-b3803ecefb071988/out/
common.rs

1#![doc = "MAVLink common dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23pub const DIALECT_NUMBER: u8 = 0u8;
24#[cfg_attr(feature = "ts", derive(TS))]
25#[cfg_attr(feature = "ts", ts(export))]
26#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28#[cfg_attr(feature = "serde", serde(tag = "type"))]
29#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30#[repr(u32)]
31#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
32pub enum ActuatorConfiguration {
33    #[doc = "Do nothing."]
34    ACTUATOR_CONFIGURATION_NONE = 0,
35    #[doc = "Command the actuator to beep now."]
36    ACTUATOR_CONFIGURATION_BEEP = 1,
37    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
38    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
39    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
41    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
42    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
45}
46impl ActuatorConfiguration {
47    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
48}
49impl Default for ActuatorConfiguration {
50    fn default() -> Self {
51        Self::DEFAULT
52    }
53}
54#[cfg_attr(feature = "ts", derive(TS))]
55#[cfg_attr(feature = "ts", ts(export))]
56#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
57#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
58#[cfg_attr(feature = "serde", serde(tag = "type"))]
59#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
60#[repr(u32)]
61#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
62pub enum ActuatorOutputFunction {
63    #[doc = "No function (disabled)."]
64    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
65    #[doc = "Motor 1"]
66    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
67    #[doc = "Motor 2"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
69    #[doc = "Motor 3"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
71    #[doc = "Motor 4"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
73    #[doc = "Motor 5"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
75    #[doc = "Motor 6"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
77    #[doc = "Motor 7"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
79    #[doc = "Motor 8"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
81    #[doc = "Motor 9"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
83    #[doc = "Motor 10"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
85    #[doc = "Motor 11"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
87    #[doc = "Motor 12"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
89    #[doc = "Motor 13"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
91    #[doc = "Motor 14"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
93    #[doc = "Motor 15"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
95    #[doc = "Motor 16"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
97    #[doc = "Servo 1"]
98    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
99    #[doc = "Servo 2"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
101    #[doc = "Servo 3"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
103    #[doc = "Servo 4"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
105    #[doc = "Servo 5"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
107    #[doc = "Servo 6"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
109    #[doc = "Servo 7"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
111    #[doc = "Servo 8"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
113    #[doc = "Servo 9"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
115    #[doc = "Servo 10"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
117    #[doc = "Servo 11"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
119    #[doc = "Servo 12"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
121    #[doc = "Servo 13"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
123    #[doc = "Servo 14"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
125    #[doc = "Servo 15"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
127    #[doc = "Servo 16"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
129}
130impl ActuatorOutputFunction {
131    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
132}
133impl Default for ActuatorOutputFunction {
134    fn default() -> Self {
135        Self::DEFAULT
136    }
137}
138#[cfg_attr(feature = "ts", derive(TS))]
139#[cfg_attr(feature = "ts", ts(export))]
140#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
142#[cfg_attr(feature = "serde", serde(tag = "type"))]
143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
144#[repr(u32)]
145#[doc = "Enumeration of the ADSB altimeter types"]
146pub enum AdsbAltitudeType {
147    #[doc = "Altitude reported from a Baro source using QNH reference"]
148    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
149    #[doc = "Altitude reported from a GNSS source"]
150    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
151}
152impl AdsbAltitudeType {
153    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
154}
155impl Default for AdsbAltitudeType {
156    fn default() -> Self {
157        Self::DEFAULT
158    }
159}
160#[cfg_attr(feature = "ts", derive(TS))]
161#[cfg_attr(feature = "ts", ts(export))]
162#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
164#[cfg_attr(feature = "serde", serde(tag = "type"))]
165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
166#[repr(u32)]
167#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
168pub enum AdsbEmitterType {
169    ADSB_EMITTER_TYPE_NO_INFO = 0,
170    ADSB_EMITTER_TYPE_LIGHT = 1,
171    ADSB_EMITTER_TYPE_SMALL = 2,
172    ADSB_EMITTER_TYPE_LARGE = 3,
173    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
174    ADSB_EMITTER_TYPE_HEAVY = 5,
175    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
176    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
177    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
178    ADSB_EMITTER_TYPE_GLIDER = 9,
179    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
180    ADSB_EMITTER_TYPE_PARACHUTE = 11,
181    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
182    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
183    ADSB_EMITTER_TYPE_UAV = 14,
184    ADSB_EMITTER_TYPE_SPACE = 15,
185    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
186    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
187    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
188    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
189}
190impl AdsbEmitterType {
191    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
192}
193impl Default for AdsbEmitterType {
194    fn default() -> Self {
195        Self::DEFAULT
196    }
197}
198bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
199impl AdsbFlags {
200    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
201}
202impl Default for AdsbFlags {
203    fn default() -> Self {
204        Self::DEFAULT
205    }
206}
207bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
208impl AisFlags {
209    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
210}
211impl Default for AisFlags {
212    fn default() -> Self {
213        Self::DEFAULT
214    }
215}
216#[cfg_attr(feature = "ts", derive(TS))]
217#[cfg_attr(feature = "ts", ts(export))]
218#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
220#[cfg_attr(feature = "serde", serde(tag = "type"))]
221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
222#[repr(u32)]
223#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
224pub enum AisNavStatus {
225    #[doc = "Under way using engine."]
226    UNDER_WAY = 0,
227    AIS_NAV_ANCHORED = 1,
228    AIS_NAV_UN_COMMANDED = 2,
229    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
230    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
231    AIS_NAV_MOORED = 5,
232    AIS_NAV_AGROUND = 6,
233    AIS_NAV_FISHING = 7,
234    AIS_NAV_SAILING = 8,
235    AIS_NAV_RESERVED_HSC = 9,
236    AIS_NAV_RESERVED_WIG = 10,
237    AIS_NAV_RESERVED_1 = 11,
238    AIS_NAV_RESERVED_2 = 12,
239    AIS_NAV_RESERVED_3 = 13,
240    #[doc = "Search And Rescue Transponder."]
241    AIS_NAV_AIS_SART = 14,
242    #[doc = "Not available (default)."]
243    AIS_NAV_UNKNOWN = 15,
244}
245impl AisNavStatus {
246    pub const DEFAULT: Self = Self::UNDER_WAY;
247}
248impl Default for AisNavStatus {
249    fn default() -> Self {
250        Self::DEFAULT
251    }
252}
253#[cfg_attr(feature = "ts", derive(TS))]
254#[cfg_attr(feature = "ts", ts(export))]
255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
257#[cfg_attr(feature = "serde", serde(tag = "type"))]
258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
259#[repr(u32)]
260#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
261pub enum AisType {
262    #[doc = "Not available (default)."]
263    AIS_TYPE_UNKNOWN = 0,
264    AIS_TYPE_RESERVED_1 = 1,
265    AIS_TYPE_RESERVED_2 = 2,
266    AIS_TYPE_RESERVED_3 = 3,
267    AIS_TYPE_RESERVED_4 = 4,
268    AIS_TYPE_RESERVED_5 = 5,
269    AIS_TYPE_RESERVED_6 = 6,
270    AIS_TYPE_RESERVED_7 = 7,
271    AIS_TYPE_RESERVED_8 = 8,
272    AIS_TYPE_RESERVED_9 = 9,
273    AIS_TYPE_RESERVED_10 = 10,
274    AIS_TYPE_RESERVED_11 = 11,
275    AIS_TYPE_RESERVED_12 = 12,
276    AIS_TYPE_RESERVED_13 = 13,
277    AIS_TYPE_RESERVED_14 = 14,
278    AIS_TYPE_RESERVED_15 = 15,
279    AIS_TYPE_RESERVED_16 = 16,
280    AIS_TYPE_RESERVED_17 = 17,
281    AIS_TYPE_RESERVED_18 = 18,
282    AIS_TYPE_RESERVED_19 = 19,
283    #[doc = "Wing In Ground effect."]
284    AIS_TYPE_WIG = 20,
285    AIS_TYPE_WIG_HAZARDOUS_A = 21,
286    AIS_TYPE_WIG_HAZARDOUS_B = 22,
287    AIS_TYPE_WIG_HAZARDOUS_C = 23,
288    AIS_TYPE_WIG_HAZARDOUS_D = 24,
289    AIS_TYPE_WIG_RESERVED_1 = 25,
290    AIS_TYPE_WIG_RESERVED_2 = 26,
291    AIS_TYPE_WIG_RESERVED_3 = 27,
292    AIS_TYPE_WIG_RESERVED_4 = 28,
293    AIS_TYPE_WIG_RESERVED_5 = 29,
294    AIS_TYPE_FISHING = 30,
295    AIS_TYPE_TOWING = 31,
296    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
297    AIS_TYPE_TOWING_LARGE = 32,
298    #[doc = "Dredging or other underwater ops."]
299    AIS_TYPE_DREDGING = 33,
300    AIS_TYPE_DIVING = 34,
301    AIS_TYPE_MILITARY = 35,
302    AIS_TYPE_SAILING = 36,
303    AIS_TYPE_PLEASURE = 37,
304    AIS_TYPE_RESERVED_20 = 38,
305    AIS_TYPE_RESERVED_21 = 39,
306    #[doc = "High Speed Craft."]
307    AIS_TYPE_HSC = 40,
308    AIS_TYPE_HSC_HAZARDOUS_A = 41,
309    AIS_TYPE_HSC_HAZARDOUS_B = 42,
310    AIS_TYPE_HSC_HAZARDOUS_C = 43,
311    AIS_TYPE_HSC_HAZARDOUS_D = 44,
312    AIS_TYPE_HSC_RESERVED_1 = 45,
313    AIS_TYPE_HSC_RESERVED_2 = 46,
314    AIS_TYPE_HSC_RESERVED_3 = 47,
315    AIS_TYPE_HSC_RESERVED_4 = 48,
316    AIS_TYPE_HSC_UNKNOWN = 49,
317    AIS_TYPE_PILOT = 50,
318    #[doc = "Search And Rescue vessel."]
319    AIS_TYPE_SAR = 51,
320    AIS_TYPE_TUG = 52,
321    AIS_TYPE_PORT_TENDER = 53,
322    #[doc = "Anti-pollution equipment."]
323    AIS_TYPE_ANTI_POLLUTION = 54,
324    AIS_TYPE_LAW_ENFORCEMENT = 55,
325    AIS_TYPE_SPARE_LOCAL_1 = 56,
326    AIS_TYPE_SPARE_LOCAL_2 = 57,
327    AIS_TYPE_MEDICAL_TRANSPORT = 58,
328    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
329    AIS_TYPE_NONECOMBATANT = 59,
330    AIS_TYPE_PASSENGER = 60,
331    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
332    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
333    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
334    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
335    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
336    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
337    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
338    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
339    AIS_TYPE_PASSENGER_UNKNOWN = 69,
340    AIS_TYPE_CARGO = 70,
341    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
342    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
343    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
344    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
345    AIS_TYPE_CARGO_RESERVED_1 = 75,
346    AIS_TYPE_CARGO_RESERVED_2 = 76,
347    AIS_TYPE_CARGO_RESERVED_3 = 77,
348    AIS_TYPE_CARGO_RESERVED_4 = 78,
349    AIS_TYPE_CARGO_UNKNOWN = 79,
350    AIS_TYPE_TANKER = 80,
351    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
352    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
353    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
354    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
355    AIS_TYPE_TANKER_RESERVED_1 = 85,
356    AIS_TYPE_TANKER_RESERVED_2 = 86,
357    AIS_TYPE_TANKER_RESERVED_3 = 87,
358    AIS_TYPE_TANKER_RESERVED_4 = 88,
359    AIS_TYPE_TANKER_UNKNOWN = 89,
360    AIS_TYPE_OTHER = 90,
361    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
362    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
363    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
364    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
365    AIS_TYPE_OTHER_RESERVED_1 = 95,
366    AIS_TYPE_OTHER_RESERVED_2 = 96,
367    AIS_TYPE_OTHER_RESERVED_3 = 97,
368    AIS_TYPE_OTHER_RESERVED_4 = 98,
369    AIS_TYPE_OTHER_UNKNOWN = 99,
370}
371impl AisType {
372    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
373}
374impl Default for AisType {
375    fn default() -> Self {
376        Self::DEFAULT
377    }
378}
379bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
380impl AttitudeTargetTypemask {
381    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
382}
383impl Default for AttitudeTargetTypemask {
384    fn default() -> Self {
385        Self::DEFAULT
386    }
387}
388#[cfg_attr(feature = "ts", derive(TS))]
389#[cfg_attr(feature = "ts", ts(export))]
390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
392#[cfg_attr(feature = "serde", serde(tag = "type"))]
393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
394#[repr(u32)]
395#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
396pub enum AutotuneAxis {
397    #[doc = "Autotune roll axis."]
398    AUTOTUNE_AXIS_ROLL = 1,
399    #[doc = "Autotune pitch axis."]
400    AUTOTUNE_AXIS_PITCH = 2,
401    #[doc = "Autotune yaw axis."]
402    AUTOTUNE_AXIS_YAW = 4,
403}
404impl AutotuneAxis {
405    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
406}
407impl Default for AutotuneAxis {
408    fn default() -> Self {
409        Self::DEFAULT
410    }
411}
412bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
413impl CameraCapFlags {
414    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
415}
416impl Default for CameraCapFlags {
417    fn default() -> Self {
418        Self::DEFAULT
419    }
420}
421#[cfg_attr(feature = "ts", derive(TS))]
422#[cfg_attr(feature = "ts", ts(export))]
423#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
425#[cfg_attr(feature = "serde", serde(tag = "type"))]
426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
427#[repr(u32)]
428#[doc = "Camera Modes."]
429pub enum CameraMode {
430    #[doc = "Camera is in image/photo capture mode."]
431    CAMERA_MODE_IMAGE = 0,
432    #[doc = "Camera is in video capture mode."]
433    CAMERA_MODE_VIDEO = 1,
434    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
435    CAMERA_MODE_IMAGE_SURVEY = 2,
436}
437impl CameraMode {
438    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
439}
440impl Default for CameraMode {
441    fn default() -> Self {
442        Self::DEFAULT
443    }
444}
445#[cfg_attr(feature = "ts", derive(TS))]
446#[cfg_attr(feature = "ts", ts(export))]
447#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
449#[cfg_attr(feature = "serde", serde(tag = "type"))]
450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
451#[repr(u32)]
452#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
453pub enum CameraSource {
454    #[doc = "Default camera source."]
455    CAMERA_SOURCE_DEFAULT = 0,
456    #[doc = "RGB camera source."]
457    CAMERA_SOURCE_RGB = 1,
458    #[doc = "IR camera source."]
459    CAMERA_SOURCE_IR = 2,
460    #[doc = "NDVI camera source."]
461    CAMERA_SOURCE_NDVI = 3,
462}
463impl CameraSource {
464    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
465}
466impl Default for CameraSource {
467    fn default() -> Self {
468        Self::DEFAULT
469    }
470}
471#[cfg_attr(feature = "ts", derive(TS))]
472#[cfg_attr(feature = "ts", ts(export))]
473#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
475#[cfg_attr(feature = "serde", serde(tag = "type"))]
476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
477#[repr(u32)]
478#[doc = "Camera tracking modes"]
479pub enum CameraTrackingMode {
480    #[doc = "Not tracking"]
481    CAMERA_TRACKING_MODE_NONE = 0,
482    #[doc = "Target is a point"]
483    CAMERA_TRACKING_MODE_POINT = 1,
484    #[doc = "Target is a rectangle"]
485    CAMERA_TRACKING_MODE_RECTANGLE = 2,
486}
487impl CameraTrackingMode {
488    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
489}
490impl Default for CameraTrackingMode {
491    fn default() -> Self {
492        Self::DEFAULT
493    }
494}
495#[cfg_attr(feature = "ts", derive(TS))]
496#[cfg_attr(feature = "ts", ts(export))]
497#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
499#[cfg_attr(feature = "serde", serde(tag = "type"))]
500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
501#[repr(u32)]
502#[doc = "Camera tracking status flags"]
503pub enum CameraTrackingStatusFlags {
504    #[doc = "Camera is not tracking"]
505    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
506    #[doc = "Camera is tracking"]
507    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
508    #[doc = "Camera tracking in error state"]
509    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
510}
511impl CameraTrackingStatusFlags {
512    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
513}
514impl Default for CameraTrackingStatusFlags {
515    fn default() -> Self {
516        Self::DEFAULT
517    }
518}
519bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
520impl CameraTrackingTargetData {
521    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
522}
523impl Default for CameraTrackingTargetData {
524    fn default() -> Self {
525        Self::DEFAULT
526    }
527}
528#[cfg_attr(feature = "ts", derive(TS))]
529#[cfg_attr(feature = "ts", ts(export))]
530#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
532#[cfg_attr(feature = "serde", serde(tag = "type"))]
533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
534#[repr(u32)]
535#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
536pub enum CameraZoomType {
537    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
538    ZOOM_TYPE_STEP = 0,
539    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
540    ZOOM_TYPE_CONTINUOUS = 1,
541    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
542    ZOOM_TYPE_RANGE = 2,
543    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
544    ZOOM_TYPE_FOCAL_LENGTH = 3,
545    #[doc = "Zoom value as horizontal field of view in degrees."]
546    ZOOM_TYPE_HORIZONTAL_FOV = 4,
547}
548impl CameraZoomType {
549    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
550}
551impl Default for CameraZoomType {
552    fn default() -> Self {
553        Self::DEFAULT
554    }
555}
556#[cfg_attr(feature = "ts", derive(TS))]
557#[cfg_attr(feature = "ts", ts(export))]
558#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
560#[cfg_attr(feature = "serde", serde(tag = "type"))]
561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
562#[repr(u32)]
563pub enum CanFilterOp {
564    CAN_FILTER_REPLACE = 0,
565    CAN_FILTER_ADD = 1,
566    CAN_FILTER_REMOVE = 2,
567}
568impl CanFilterOp {
569    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
570}
571impl Default for CanFilterOp {
572    fn default() -> Self {
573        Self::DEFAULT
574    }
575}
576#[cfg_attr(feature = "ts", derive(TS))]
577#[cfg_attr(feature = "ts", ts(export))]
578#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
580#[cfg_attr(feature = "serde", serde(tag = "type"))]
581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
582#[repr(u32)]
583#[doc = "Possible responses from a CELLULAR_CONFIG message."]
584pub enum CellularConfigResponse {
585    #[doc = "Changes accepted."]
586    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
587    #[doc = "Invalid APN."]
588    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
589    #[doc = "Invalid PIN."]
590    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
591    #[doc = "Changes rejected."]
592    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
593    #[doc = "PUK is required to unblock SIM card."]
594    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
595}
596impl CellularConfigResponse {
597    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
598}
599impl Default for CellularConfigResponse {
600    fn default() -> Self {
601        Self::DEFAULT
602    }
603}
604#[cfg_attr(feature = "ts", derive(TS))]
605#[cfg_attr(feature = "ts", ts(export))]
606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
608#[cfg_attr(feature = "serde", serde(tag = "type"))]
609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
610#[repr(u32)]
611#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
612pub enum CellularNetworkFailedReason {
613    #[doc = "No error"]
614    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
615    #[doc = "Error state is unknown"]
616    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
617    #[doc = "SIM is required for the modem but missing"]
618    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
619    #[doc = "SIM is available, but not usable for connection"]
620    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
621}
622impl CellularNetworkFailedReason {
623    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
624}
625impl Default for CellularNetworkFailedReason {
626    fn default() -> Self {
627        Self::DEFAULT
628    }
629}
630#[cfg_attr(feature = "ts", derive(TS))]
631#[cfg_attr(feature = "ts", ts(export))]
632#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
634#[cfg_attr(feature = "serde", serde(tag = "type"))]
635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
636#[repr(u32)]
637#[doc = "Cellular network radio type"]
638pub enum CellularNetworkRadioType {
639    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
640    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
641    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
642    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
643    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
644}
645impl CellularNetworkRadioType {
646    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
647}
648impl Default for CellularNetworkRadioType {
649    fn default() -> Self {
650        Self::DEFAULT
651    }
652}
653#[cfg_attr(feature = "ts", derive(TS))]
654#[cfg_attr(feature = "ts", ts(export))]
655#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
657#[cfg_attr(feature = "serde", serde(tag = "type"))]
658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
659#[repr(u32)]
660#[doc = "These flags encode the cellular network status"]
661pub enum CellularStatusFlag {
662    #[doc = "State unknown or not reportable."]
663    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
664    #[doc = "Modem is unusable"]
665    CELLULAR_STATUS_FLAG_FAILED = 1,
666    #[doc = "Modem is being initialized"]
667    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
668    #[doc = "Modem is locked"]
669    CELLULAR_STATUS_FLAG_LOCKED = 3,
670    #[doc = "Modem is not enabled and is powered down"]
671    CELLULAR_STATUS_FLAG_DISABLED = 4,
672    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
673    CELLULAR_STATUS_FLAG_DISABLING = 5,
674    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
675    CELLULAR_STATUS_FLAG_ENABLING = 6,
676    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
677    CELLULAR_STATUS_FLAG_ENABLED = 7,
678    #[doc = "Modem is searching for a network provider to register"]
679    CELLULAR_STATUS_FLAG_SEARCHING = 8,
680    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
681    CELLULAR_STATUS_FLAG_REGISTERED = 9,
682    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
683    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
684    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
685    CELLULAR_STATUS_FLAG_CONNECTING = 11,
686    #[doc = "One or more packet data bearers is active and connected"]
687    CELLULAR_STATUS_FLAG_CONNECTED = 12,
688}
689impl CellularStatusFlag {
690    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
691}
692impl Default for CellularStatusFlag {
693    fn default() -> Self {
694        Self::DEFAULT
695    }
696}
697#[cfg_attr(feature = "ts", derive(TS))]
698#[cfg_attr(feature = "ts", ts(export))]
699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
701#[cfg_attr(feature = "serde", serde(tag = "type"))]
702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
703#[repr(u32)]
704#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
705pub enum CompMetadataType {
706    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
707    COMP_METADATA_TYPE_GENERAL = 0,
708    #[doc = "Parameter meta data."]
709    COMP_METADATA_TYPE_PARAMETER = 1,
710    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
711    COMP_METADATA_TYPE_COMMANDS = 2,
712    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
713    COMP_METADATA_TYPE_PERIPHERALS = 3,
714    #[doc = "Meta data for the events interface."]
715    COMP_METADATA_TYPE_EVENTS = 4,
716    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
717    COMP_METADATA_TYPE_ACTUATORS = 5,
718}
719impl CompMetadataType {
720    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
721}
722impl Default for CompMetadataType {
723    fn default() -> Self {
724        Self::DEFAULT
725    }
726}
727#[cfg_attr(feature = "ts", derive(TS))]
728#[cfg_attr(feature = "ts", ts(export))]
729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
731#[cfg_attr(feature = "serde", serde(tag = "type"))]
732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
733#[repr(u32)]
734#[doc = "Indicates the ESC connection type."]
735pub enum EscConnectionType {
736    #[doc = "Traditional PPM ESC."]
737    ESC_CONNECTION_TYPE_PPM = 0,
738    #[doc = "Serial Bus connected ESC."]
739    ESC_CONNECTION_TYPE_SERIAL = 1,
740    #[doc = "One Shot PPM ESC."]
741    ESC_CONNECTION_TYPE_ONESHOT = 2,
742    #[doc = "I2C ESC."]
743    ESC_CONNECTION_TYPE_I2C = 3,
744    #[doc = "CAN-Bus ESC."]
745    ESC_CONNECTION_TYPE_CAN = 4,
746    #[doc = "DShot ESC."]
747    ESC_CONNECTION_TYPE_DSHOT = 5,
748}
749impl EscConnectionType {
750    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
751}
752impl Default for EscConnectionType {
753    fn default() -> Self {
754        Self::DEFAULT
755    }
756}
757bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
758impl EscFailureFlags {
759    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
760}
761impl Default for EscFailureFlags {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
767impl EstimatorStatusFlags {
768    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
769}
770impl Default for EstimatorStatusFlags {
771    fn default() -> Self {
772        Self::DEFAULT
773    }
774}
775#[cfg_attr(feature = "ts", derive(TS))]
776#[cfg_attr(feature = "ts", ts(export))]
777#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
779#[cfg_attr(feature = "serde", serde(tag = "type"))]
780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
781#[repr(u32)]
782#[doc = "List of possible failure type to inject."]
783pub enum FailureType {
784    #[doc = "No failure injected, used to reset a previous failure."]
785    FAILURE_TYPE_OK = 0,
786    #[doc = "Sets unit off, so completely non-responsive."]
787    FAILURE_TYPE_OFF = 1,
788    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
789    FAILURE_TYPE_STUCK = 2,
790    #[doc = "Unit is reporting complete garbage."]
791    FAILURE_TYPE_GARBAGE = 3,
792    #[doc = "Unit is consistently wrong."]
793    FAILURE_TYPE_WRONG = 4,
794    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
795    FAILURE_TYPE_SLOW = 5,
796    #[doc = "Data of unit is delayed in time."]
797    FAILURE_TYPE_DELAYED = 6,
798    #[doc = "Unit is sometimes working, sometimes not."]
799    FAILURE_TYPE_INTERMITTENT = 7,
800}
801impl FailureType {
802    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
803}
804impl Default for FailureType {
805    fn default() -> Self {
806        Self::DEFAULT
807    }
808}
809#[cfg_attr(feature = "ts", derive(TS))]
810#[cfg_attr(feature = "ts", ts(export))]
811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
813#[cfg_attr(feature = "serde", serde(tag = "type"))]
814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
815#[repr(u32)]
816#[doc = "List of possible units where failures can be injected."]
817pub enum FailureUnit {
818    FAILURE_UNIT_SENSOR_GYRO = 0,
819    FAILURE_UNIT_SENSOR_ACCEL = 1,
820    FAILURE_UNIT_SENSOR_MAG = 2,
821    FAILURE_UNIT_SENSOR_BARO = 3,
822    FAILURE_UNIT_SENSOR_GPS = 4,
823    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
824    FAILURE_UNIT_SENSOR_VIO = 6,
825    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
826    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
827    FAILURE_UNIT_SYSTEM_BATTERY = 100,
828    FAILURE_UNIT_SYSTEM_MOTOR = 101,
829    FAILURE_UNIT_SYSTEM_SERVO = 102,
830    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
831    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
832    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
833}
834impl FailureUnit {
835    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
836}
837impl Default for FailureUnit {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[cfg_attr(feature = "ts", derive(TS))]
843#[cfg_attr(feature = "ts", ts(export))]
844#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
846#[cfg_attr(feature = "serde", serde(tag = "type"))]
847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
848#[repr(u32)]
849pub enum FenceBreach {
850    #[doc = "No last fence breach"]
851    FENCE_BREACH_NONE = 0,
852    #[doc = "Breached minimum altitude"]
853    FENCE_BREACH_MINALT = 1,
854    #[doc = "Breached maximum altitude"]
855    FENCE_BREACH_MAXALT = 2,
856    #[doc = "Breached fence boundary"]
857    FENCE_BREACH_BOUNDARY = 3,
858}
859impl FenceBreach {
860    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
861}
862impl Default for FenceBreach {
863    fn default() -> Self {
864        Self::DEFAULT
865    }
866}
867#[cfg_attr(feature = "ts", derive(TS))]
868#[cfg_attr(feature = "ts", ts(export))]
869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
871#[cfg_attr(feature = "serde", serde(tag = "type"))]
872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
873#[repr(u32)]
874#[doc = "Actions being taken to mitigate/prevent fence breach"]
875pub enum FenceMitigate {
876    #[doc = "Unknown"]
877    FENCE_MITIGATE_UNKNOWN = 0,
878    #[doc = "No actions being taken"]
879    FENCE_MITIGATE_NONE = 1,
880    #[doc = "Velocity limiting active to prevent breach"]
881    FENCE_MITIGATE_VEL_LIMIT = 2,
882}
883impl FenceMitigate {
884    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
885}
886impl Default for FenceMitigate {
887    fn default() -> Self {
888        Self::DEFAULT
889    }
890}
891#[cfg_attr(feature = "ts", derive(TS))]
892#[cfg_attr(feature = "ts", ts(export))]
893#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
895#[cfg_attr(feature = "serde", serde(tag = "type"))]
896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
897#[repr(u32)]
898#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
899pub enum FenceType {
900    #[doc = "Maximum altitude fence"]
901    FENCE_TYPE_ALT_MAX = 1,
902    #[doc = "Circle fence"]
903    FENCE_TYPE_CIRCLE = 2,
904    #[doc = "Polygon fence"]
905    FENCE_TYPE_POLYGON = 4,
906    #[doc = "Minimum altitude fence"]
907    FENCE_TYPE_ALT_MIN = 8,
908}
909impl FenceType {
910    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
911}
912impl Default for FenceType {
913    fn default() -> Self {
914        Self::DEFAULT
915    }
916}
917#[cfg_attr(feature = "ts", derive(TS))]
918#[cfg_attr(feature = "ts", ts(export))]
919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
921#[cfg_attr(feature = "serde", serde(tag = "type"))]
922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
923#[repr(u32)]
924#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
925pub enum FirmwareVersionType {
926    #[doc = "development release"]
927    FIRMWARE_VERSION_TYPE_DEV = 0,
928    #[doc = "alpha release"]
929    FIRMWARE_VERSION_TYPE_ALPHA = 64,
930    #[doc = "beta release"]
931    FIRMWARE_VERSION_TYPE_BETA = 128,
932    #[doc = "release candidate"]
933    FIRMWARE_VERSION_TYPE_RC = 192,
934    #[doc = "official stable release"]
935    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
936}
937impl FirmwareVersionType {
938    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
939}
940impl Default for FirmwareVersionType {
941    fn default() -> Self {
942        Self::DEFAULT
943    }
944}
945bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
946impl GimbalDeviceCapFlags {
947    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
948}
949impl Default for GimbalDeviceCapFlags {
950    fn default() -> Self {
951        Self::DEFAULT
952    }
953}
954bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
955impl GimbalDeviceErrorFlags {
956    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
957}
958impl Default for GimbalDeviceErrorFlags {
959    fn default() -> Self {
960        Self::DEFAULT
961    }
962}
963bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
964impl GimbalDeviceFlags {
965    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
966}
967impl Default for GimbalDeviceFlags {
968    fn default() -> Self {
969        Self::DEFAULT
970    }
971}
972bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
973impl GimbalManagerCapFlags {
974    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
975}
976impl Default for GimbalManagerCapFlags {
977    fn default() -> Self {
978        Self::DEFAULT
979    }
980}
981bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
982impl GimbalManagerFlags {
983    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
984}
985impl Default for GimbalManagerFlags {
986    fn default() -> Self {
987        Self::DEFAULT
988    }
989}
990#[cfg_attr(feature = "ts", derive(TS))]
991#[cfg_attr(feature = "ts", ts(export))]
992#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
994#[cfg_attr(feature = "serde", serde(tag = "type"))]
995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
996#[repr(u32)]
997#[doc = "Type of GPS fix"]
998pub enum GpsFixType {
999    #[doc = "No GPS connected"]
1000    GPS_FIX_TYPE_NO_GPS = 0,
1001    #[doc = "No position information, GPS is connected"]
1002    GPS_FIX_TYPE_NO_FIX = 1,
1003    #[doc = "2D position"]
1004    GPS_FIX_TYPE_2D_FIX = 2,
1005    #[doc = "3D position"]
1006    GPS_FIX_TYPE_3D_FIX = 3,
1007    #[doc = "DGPS/SBAS aided 3D position"]
1008    GPS_FIX_TYPE_DGPS = 4,
1009    #[doc = "RTK float, 3D position"]
1010    GPS_FIX_TYPE_RTK_FLOAT = 5,
1011    #[doc = "RTK Fixed, 3D position"]
1012    GPS_FIX_TYPE_RTK_FIXED = 6,
1013    #[doc = "Static fixed, typically used for base stations"]
1014    GPS_FIX_TYPE_STATIC = 7,
1015    #[doc = "PPP, 3D position."]
1016    GPS_FIX_TYPE_PPP = 8,
1017}
1018impl GpsFixType {
1019    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1020}
1021impl Default for GpsFixType {
1022    fn default() -> Self {
1023        Self::DEFAULT
1024    }
1025}
1026bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1027impl GpsInputIgnoreFlags {
1028    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1029}
1030impl Default for GpsInputIgnoreFlags {
1031    fn default() -> Self {
1032        Self::DEFAULT
1033    }
1034}
1035#[cfg_attr(feature = "ts", derive(TS))]
1036#[cfg_attr(feature = "ts", ts(export))]
1037#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1039#[cfg_attr(feature = "serde", serde(tag = "type"))]
1040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1041#[repr(u32)]
1042#[doc = "Gripper actions."]
1043pub enum GripperActions {
1044    #[doc = "Gripper release cargo."]
1045    GRIPPER_ACTION_RELEASE = 0,
1046    #[doc = "Gripper grab onto cargo."]
1047    GRIPPER_ACTION_GRAB = 1,
1048}
1049impl GripperActions {
1050    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1051}
1052impl Default for GripperActions {
1053    fn default() -> Self {
1054        Self::DEFAULT
1055    }
1056}
1057bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1058impl HighresImuUpdatedFlags {
1059    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1060}
1061impl Default for HighresImuUpdatedFlags {
1062    fn default() -> Self {
1063        Self::DEFAULT
1064    }
1065}
1066bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1067impl HilActuatorControlsFlags {
1068    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1069}
1070impl Default for HilActuatorControlsFlags {
1071    fn default() -> Self {
1072        Self::DEFAULT
1073    }
1074}
1075bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1076impl HilSensorUpdatedFlags {
1077    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1078}
1079impl Default for HilSensorUpdatedFlags {
1080    fn default() -> Self {
1081        Self::DEFAULT
1082    }
1083}
1084bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1085impl HlFailureFlag {
1086    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1087}
1088impl Default for HlFailureFlag {
1089    fn default() -> Self {
1090        Self::DEFAULT
1091    }
1092}
1093bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1094impl IlluminatorErrorFlags {
1095    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1096}
1097impl Default for IlluminatorErrorFlags {
1098    fn default() -> Self {
1099        Self::DEFAULT
1100    }
1101}
1102#[cfg_attr(feature = "ts", derive(TS))]
1103#[cfg_attr(feature = "ts", ts(export))]
1104#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1106#[cfg_attr(feature = "serde", serde(tag = "type"))]
1107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1108#[repr(u32)]
1109#[doc = "Modes of illuminator"]
1110pub enum IlluminatorMode {
1111    #[doc = "Illuminator mode is not specified/unknown"]
1112    ILLUMINATOR_MODE_UNKNOWN = 0,
1113    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1114    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1115    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1116    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1117}
1118impl IlluminatorMode {
1119    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1120}
1121impl Default for IlluminatorMode {
1122    fn default() -> Self {
1123        Self::DEFAULT
1124    }
1125}
1126#[cfg_attr(feature = "ts", derive(TS))]
1127#[cfg_attr(feature = "ts", ts(export))]
1128#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1130#[cfg_attr(feature = "serde", serde(tag = "type"))]
1131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1132#[repr(u32)]
1133#[doc = "Type of landing target"]
1134pub enum LandingTargetType {
1135    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1136    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1137    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1138    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1139    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1140    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1141    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1142    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1143}
1144impl LandingTargetType {
1145    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1146}
1147impl Default for LandingTargetType {
1148    fn default() -> Self {
1149        Self::DEFAULT
1150    }
1151}
1152#[cfg_attr(feature = "ts", derive(TS))]
1153#[cfg_attr(feature = "ts", ts(export))]
1154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1156#[cfg_attr(feature = "serde", serde(tag = "type"))]
1157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1158#[repr(u32)]
1159pub enum MagCalStatus {
1160    MAG_CAL_NOT_STARTED = 0,
1161    MAG_CAL_WAITING_TO_START = 1,
1162    MAG_CAL_RUNNING_STEP_ONE = 2,
1163    MAG_CAL_RUNNING_STEP_TWO = 3,
1164    MAG_CAL_SUCCESS = 4,
1165    MAG_CAL_FAILED = 5,
1166    MAG_CAL_BAD_ORIENTATION = 6,
1167    MAG_CAL_BAD_RADIUS = 7,
1168}
1169impl MagCalStatus {
1170    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1171}
1172impl Default for MagCalStatus {
1173    fn default() -> Self {
1174        Self::DEFAULT
1175    }
1176}
1177#[cfg_attr(feature = "ts", derive(TS))]
1178#[cfg_attr(feature = "ts", ts(export))]
1179#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1181#[cfg_attr(feature = "serde", serde(tag = "type"))]
1182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1183#[repr(u32)]
1184pub enum MavArmAuthDeniedReason {
1185    #[doc = "Not a specific reason"]
1186    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1187    #[doc = "Authorizer will send the error as string to GCS"]
1188    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1189    #[doc = "At least one waypoint have a invalid value"]
1190    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1191    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1192    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1193    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1194    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1195    #[doc = "Weather is not good to fly"]
1196    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1197}
1198impl MavArmAuthDeniedReason {
1199    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1200}
1201impl Default for MavArmAuthDeniedReason {
1202    fn default() -> Self {
1203        Self::DEFAULT
1204    }
1205}
1206#[cfg_attr(feature = "ts", derive(TS))]
1207#[cfg_attr(feature = "ts", ts(export))]
1208#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1210#[cfg_attr(feature = "serde", serde(tag = "type"))]
1211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1212#[repr(u32)]
1213#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1214pub enum MavAutopilot {
1215    #[doc = "Generic autopilot, full support for everything"]
1216    MAV_AUTOPILOT_GENERIC = 0,
1217    #[doc = "Reserved for future use."]
1218    MAV_AUTOPILOT_RESERVED = 1,
1219    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1220    MAV_AUTOPILOT_SLUGS = 2,
1221    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1222    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1223    #[doc = "OpenPilot, <http://openpilot.org>"]
1224    MAV_AUTOPILOT_OPENPILOT = 4,
1225    #[doc = "Generic autopilot only supporting simple waypoints"]
1226    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1227    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1228    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1229    #[doc = "Generic autopilot supporting the full mission command set"]
1230    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1231    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1232    MAV_AUTOPILOT_INVALID = 8,
1233    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1234    MAV_AUTOPILOT_PPZ = 9,
1235    #[doc = "UAV Dev Board"]
1236    MAV_AUTOPILOT_UDB = 10,
1237    #[doc = "FlexiPilot"]
1238    MAV_AUTOPILOT_FP = 11,
1239    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1240    MAV_AUTOPILOT_PX4 = 12,
1241    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1242    MAV_AUTOPILOT_SMACCMPILOT = 13,
1243    #[doc = "AutoQuad -- <http://autoquad.org>"]
1244    MAV_AUTOPILOT_AUTOQUAD = 14,
1245    #[doc = "Armazila -- <http://armazila.com>"]
1246    MAV_AUTOPILOT_ARMAZILA = 15,
1247    #[doc = "Aerob -- <http://aerob.ru>"]
1248    MAV_AUTOPILOT_AEROB = 16,
1249    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1250    MAV_AUTOPILOT_ASLUAV = 17,
1251    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1252    MAV_AUTOPILOT_SMARTAP = 18,
1253    #[doc = "AirRails - <http://uaventure.com>"]
1254    MAV_AUTOPILOT_AIRRAILS = 19,
1255    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1256    MAV_AUTOPILOT_REFLEX = 20,
1257}
1258impl MavAutopilot {
1259    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1260}
1261impl Default for MavAutopilot {
1262    fn default() -> Self {
1263        Self::DEFAULT
1264    }
1265}
1266#[cfg_attr(feature = "ts", derive(TS))]
1267#[cfg_attr(feature = "ts", ts(export))]
1268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1270#[cfg_attr(feature = "serde", serde(tag = "type"))]
1271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1272#[repr(u32)]
1273#[doc = "Enumeration for battery charge states."]
1274pub enum MavBatteryChargeState {
1275    #[doc = "Low battery state is not provided"]
1276    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1277    #[doc = "Battery is not in low state. Normal operation."]
1278    MAV_BATTERY_CHARGE_STATE_OK = 1,
1279    #[doc = "Battery state is low, warn and monitor close."]
1280    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1281    #[doc = "Battery state is critical, return or abort immediately."]
1282    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1283    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1284    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1285    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1286    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1287    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1288    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1289    #[doc = "Battery is charging."]
1290    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1291}
1292impl MavBatteryChargeState {
1293    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1294}
1295impl Default for MavBatteryChargeState {
1296    fn default() -> Self {
1297        Self::DEFAULT
1298    }
1299}
1300bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1301impl MavBatteryFault {
1302    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1303}
1304impl Default for MavBatteryFault {
1305    fn default() -> Self {
1306        Self::DEFAULT
1307    }
1308}
1309#[cfg_attr(feature = "ts", derive(TS))]
1310#[cfg_attr(feature = "ts", ts(export))]
1311#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1313#[cfg_attr(feature = "serde", serde(tag = "type"))]
1314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1315#[repr(u32)]
1316#[doc = "Enumeration of battery functions"]
1317pub enum MavBatteryFunction {
1318    #[doc = "Battery function is unknown"]
1319    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1320    #[doc = "Battery supports all flight systems"]
1321    MAV_BATTERY_FUNCTION_ALL = 1,
1322    #[doc = "Battery for the propulsion system"]
1323    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1324    #[doc = "Avionics battery"]
1325    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1326    #[doc = "Payload battery"]
1327    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1328}
1329impl MavBatteryFunction {
1330    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1331}
1332impl Default for MavBatteryFunction {
1333    fn default() -> Self {
1334        Self::DEFAULT
1335    }
1336}
1337#[cfg_attr(feature = "ts", derive(TS))]
1338#[cfg_attr(feature = "ts", ts(export))]
1339#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1341#[cfg_attr(feature = "serde", serde(tag = "type"))]
1342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1343#[repr(u32)]
1344#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1345pub enum MavBatteryMode {
1346    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1347    MAV_BATTERY_MODE_UNKNOWN = 0,
1348    #[doc = "Battery is auto discharging (towards storage level)."]
1349    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1350    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1351    MAV_BATTERY_MODE_HOT_SWAP = 2,
1352}
1353impl MavBatteryMode {
1354    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1355}
1356impl Default for MavBatteryMode {
1357    fn default() -> Self {
1358        Self::DEFAULT
1359    }
1360}
1361#[cfg_attr(feature = "ts", derive(TS))]
1362#[cfg_attr(feature = "ts", ts(export))]
1363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1365#[cfg_attr(feature = "serde", serde(tag = "type"))]
1366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1367#[repr(u32)]
1368#[doc = "Enumeration of battery types"]
1369pub enum MavBatteryType {
1370    #[doc = "Not specified."]
1371    MAV_BATTERY_TYPE_UNKNOWN = 0,
1372    #[doc = "Lithium polymer battery"]
1373    MAV_BATTERY_TYPE_LIPO = 1,
1374    #[doc = "Lithium-iron-phosphate battery"]
1375    MAV_BATTERY_TYPE_LIFE = 2,
1376    #[doc = "Lithium-ION battery"]
1377    MAV_BATTERY_TYPE_LION = 3,
1378    #[doc = "Nickel metal hydride battery"]
1379    MAV_BATTERY_TYPE_NIMH = 4,
1380}
1381impl MavBatteryType {
1382    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1383}
1384impl Default for MavBatteryType {
1385    fn default() -> Self {
1386        Self::DEFAULT
1387    }
1388}
1389#[cfg_attr(feature = "ts", derive(TS))]
1390#[cfg_attr(feature = "ts", ts(export))]
1391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1393#[cfg_attr(feature = "serde", serde(tag = "type"))]
1394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1395#[repr(u32)]
1396#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1397pub enum MavCmd {
1398    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1399    MAV_CMD_NAV_WAYPOINT = 16,
1400    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1401    MAV_CMD_NAV_LOITER_UNLIM = 17,
1402    #[doc = "Loiter around this waypoint for X turns"]
1403    MAV_CMD_NAV_LOITER_TURNS = 18,
1404    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1405    MAV_CMD_NAV_LOITER_TIME = 19,
1406    #[doc = "Return to launch location"]
1407    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1408    #[doc = "Land at location."]
1409    MAV_CMD_NAV_LAND = 21,
1410    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1411    MAV_CMD_NAV_TAKEOFF = 22,
1412    #[doc = "Land at local position (local frame only)"]
1413    MAV_CMD_NAV_LAND_LOCAL = 23,
1414    #[doc = "Takeoff from local position (local frame only)"]
1415    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1416    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1417    MAV_CMD_NAV_FOLLOW = 25,
1418    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1419    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1420    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1421    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1422    #[doc = "Begin following a target"]
1423    MAV_CMD_DO_FOLLOW = 32,
1424    #[doc = "Reposition the MAV after a follow target command has been sent"]
1425    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1426    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1427    MAV_CMD_DO_ORBIT = 34,
1428    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1429    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1430    MAV_CMD_NAV_ROI = 80,
1431    #[doc = "Control autonomous path planning on the MAV."]
1432    MAV_CMD_NAV_PATHPLANNING = 81,
1433    #[doc = "Navigate to waypoint using a spline path."]
1434    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1435    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1436    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1437    #[doc = "Land using VTOL mode"]
1438    MAV_CMD_NAV_VTOL_LAND = 85,
1439    #[doc = "hand control over to an external controller"]
1440    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1441    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1442    MAV_CMD_NAV_DELAY = 93,
1443    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1444    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1445    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1446    MAV_CMD_NAV_LAST = 95,
1447    #[doc = "Delay mission state machine."]
1448    MAV_CMD_CONDITION_DELAY = 112,
1449    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1450    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1451    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1452    MAV_CMD_CONDITION_DISTANCE = 114,
1453    #[doc = "Reach a certain target angle."]
1454    MAV_CMD_CONDITION_YAW = 115,
1455    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1456    MAV_CMD_CONDITION_LAST = 159,
1457    #[doc = "Set system mode."]
1458    MAV_CMD_DO_SET_MODE = 176,
1459    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1460    MAV_CMD_DO_JUMP = 177,
1461    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1462    MAV_CMD_DO_CHANGE_SPEED = 178,
1463    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1464    MAV_CMD_DO_SET_HOME = 179,
1465    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1466    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1467    MAV_CMD_DO_SET_PARAMETER = 180,
1468    #[doc = "Set a relay to a condition."]
1469    MAV_CMD_DO_SET_RELAY = 181,
1470    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1471    MAV_CMD_DO_REPEAT_RELAY = 182,
1472    #[doc = "Set a servo to a desired PWM value."]
1473    MAV_CMD_DO_SET_SERVO = 183,
1474    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1475    MAV_CMD_DO_REPEAT_SERVO = 184,
1476    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1477    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1478    #[doc = "Change altitude set point."]
1479    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1480    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1481    MAV_CMD_DO_SET_ACTUATOR = 187,
1482    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1483    MAV_CMD_DO_RETURN_PATH_START = 188,
1484    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1485    MAV_CMD_DO_LAND_START = 189,
1486    #[doc = "Mission command to perform a landing from a rally point."]
1487    MAV_CMD_DO_RALLY_LAND = 190,
1488    #[doc = "Mission command to safely abort an autonomous landing."]
1489    MAV_CMD_DO_GO_AROUND = 191,
1490    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1491    MAV_CMD_DO_REPOSITION = 192,
1492    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1493    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1494    #[doc = "Set moving direction to forward or reverse."]
1495    MAV_CMD_DO_SET_REVERSE = 194,
1496    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1497    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1498    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1499    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1500    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1501    MAV_CMD_DO_SET_ROI_NONE = 197,
1502    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1503    MAV_CMD_DO_SET_ROI_SYSID = 198,
1504    #[doc = "Control onboard camera system."]
1505    MAV_CMD_DO_CONTROL_VIDEO = 200,
1506    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1507    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1508    MAV_CMD_DO_SET_ROI = 201,
1509    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1510    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1511    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1512    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1513    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1514    #[doc = "Mission command to configure a camera or antenna mount"]
1515    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1516    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1517    #[doc = "Mission command to control a camera or antenna mount"]
1518    MAV_CMD_DO_MOUNT_CONTROL = 205,
1519    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1520    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1521    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1522    MAV_CMD_DO_FENCE_ENABLE = 207,
1523    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1524    MAV_CMD_DO_PARACHUTE = 208,
1525    #[doc = "Command to perform motor test."]
1526    MAV_CMD_DO_MOTOR_TEST = 209,
1527    #[doc = "Change to/from inverted flight."]
1528    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1529    #[doc = "Mission command to operate a gripper."]
1530    MAV_CMD_DO_GRIPPER = 211,
1531    #[doc = "Enable/disable autotune."]
1532    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1533    #[doc = "Sets a desired vehicle turn angle and speed change."]
1534    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1535    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1536    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1537    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1538    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1539    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1540    #[doc = "set id of master controller"]
1541    MAV_CMD_DO_GUIDED_MASTER = 221,
1542    #[doc = "Set limits for external control"]
1543    MAV_CMD_DO_GUIDED_LIMITS = 222,
1544    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1545    MAV_CMD_DO_ENGINE_CONTROL = 223,
1546    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1547    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1548    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1549    MAV_CMD_DO_LAST = 240,
1550    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1551    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1552    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1553    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1554    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1555    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1556    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1557    MAV_CMD_PREFLIGHT_STORAGE = 245,
1558    #[doc = "Request the reboot or shutdown of system components."]
1559    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1560    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1561    MAV_CMD_OVERRIDE_GOTO = 252,
1562    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1563    MAV_CMD_OBLIQUE_SURVEY = 260,
1564    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1565    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1566    #[doc = "start running a mission"]
1567    MAV_CMD_MISSION_START = 300,
1568    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1569    MAV_CMD_ACTUATOR_TEST = 310,
1570    #[doc = "Actuator configuration command."]
1571    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1572    #[doc = "Arms / Disarms a component"]
1573    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1574    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1575    MAV_CMD_RUN_PREARM_CHECKS = 401,
1576    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1577    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1578    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1579    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1580    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1581    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1582    MAV_CMD_GET_HOME_POSITION = 410,
1583    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1584    MAV_CMD_INJECT_FAILURE = 420,
1585    #[doc = "Starts receiver pairing."]
1586    MAV_CMD_START_RX_PAIR = 500,
1587    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1588    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1589    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1590    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1591    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1592    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1593    MAV_CMD_REQUEST_MESSAGE = 512,
1594    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1595    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1596    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1597    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1598    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1599    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1600    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1601    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1602    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1603    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1604    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1605    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1606    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1607    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1608    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1609    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1610    MAV_CMD_STORAGE_FORMAT = 526,
1611    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1612    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1613    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1614    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1615    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1616    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1617    #[doc = "Reset all camera settings to Factory Default"]
1618    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1619    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1620    MAV_CMD_SET_CAMERA_MODE = 530,
1621    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1622    MAV_CMD_SET_CAMERA_ZOOM = 531,
1623    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1624    MAV_CMD_SET_CAMERA_FOCUS = 532,
1625    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1626    MAV_CMD_SET_STORAGE_USAGE = 533,
1627    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1628    MAV_CMD_SET_CAMERA_SOURCE = 534,
1629    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1630    MAV_CMD_JUMP_TAG = 600,
1631    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1632    MAV_CMD_DO_JUMP_TAG = 601,
1633    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1634    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1635    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1636    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1637    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1638    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1639    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1640    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1641    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1642    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1643    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1644    #[doc = "Enable or disable on-board camera triggering system."]
1645    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1646    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1647    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1648    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1649    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1650    #[doc = "Stops ongoing tracking."]
1651    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1652    #[doc = "Starts video capture (recording)."]
1653    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1654    #[doc = "Stop the current video capture (recording)."]
1655    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1656    #[doc = "Start video streaming"]
1657    MAV_CMD_VIDEO_START_STREAMING = 2502,
1658    #[doc = "Stop the given video stream"]
1659    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1660    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1661    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1662    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1663    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1664    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1665    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1666    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1667    MAV_CMD_LOGGING_START = 2510,
1668    #[doc = "Request to stop streaming log data over MAVLink"]
1669    MAV_CMD_LOGGING_STOP = 2511,
1670    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1671    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1672    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1673    #[doc = "Create a panorama at the current position"]
1674    MAV_CMD_PANORAMA_CREATE = 2800,
1675    #[doc = "Request VTOL transition"]
1676    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1677    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1678    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1679    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1680    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1681    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1682    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1683    #[doc = "Delay mission state machine until gate has been reached."]
1684    MAV_CMD_CONDITION_GATE = 4501,
1685    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1686    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1687    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1688    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1689    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1690    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1691    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1692    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1693    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1694    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1695    #[doc = "Rally point. You can have multiple rally points defined."]
1696    MAV_CMD_NAV_RALLY_POINT = 5100,
1697    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1698    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1699    #[doc = "Change state of safety switch."]
1700    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1701    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1702    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1703    #[deprecated = "  (Deprecated since 2021-06)"]
1704    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1705    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1706    #[deprecated = "  (Deprecated since 2021-06)"]
1707    #[doc = "Control the payload deployment."]
1708    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1709    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1710    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1711    #[doc = "Command to operate winch."]
1712    MAV_CMD_DO_WINCH = 42600,
1713    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1714    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1715    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1716    MAV_CMD_WAYPOINT_USER_1 = 31000,
1717    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1718    MAV_CMD_WAYPOINT_USER_2 = 31001,
1719    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1720    MAV_CMD_WAYPOINT_USER_3 = 31002,
1721    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1722    MAV_CMD_WAYPOINT_USER_4 = 31003,
1723    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1724    MAV_CMD_WAYPOINT_USER_5 = 31004,
1725    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1726    MAV_CMD_SPATIAL_USER_1 = 31005,
1727    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1728    MAV_CMD_SPATIAL_USER_2 = 31006,
1729    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1730    MAV_CMD_SPATIAL_USER_3 = 31007,
1731    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1732    MAV_CMD_SPATIAL_USER_4 = 31008,
1733    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1734    MAV_CMD_SPATIAL_USER_5 = 31009,
1735    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1736    MAV_CMD_USER_1 = 31010,
1737    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1738    MAV_CMD_USER_2 = 31011,
1739    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1740    MAV_CMD_USER_3 = 31012,
1741    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1742    MAV_CMD_USER_4 = 31013,
1743    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1744    MAV_CMD_USER_5 = 31014,
1745    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1746    MAV_CMD_CAN_FORWARD = 32000,
1747}
1748impl MavCmd {
1749    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1750}
1751impl Default for MavCmd {
1752    fn default() -> Self {
1753        Self::DEFAULT
1754    }
1755}
1756#[cfg_attr(feature = "ts", derive(TS))]
1757#[cfg_attr(feature = "ts", ts(export))]
1758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1760#[cfg_attr(feature = "serde", serde(tag = "type"))]
1761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1762#[repr(u32)]
1763#[doc = "Possible actions an aircraft can take to avoid a collision."]
1764pub enum MavCollisionAction {
1765    #[doc = "Ignore any potential collisions"]
1766    MAV_COLLISION_ACTION_NONE = 0,
1767    #[doc = "Report potential collision"]
1768    MAV_COLLISION_ACTION_REPORT = 1,
1769    #[doc = "Ascend or Descend to avoid threat"]
1770    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1771    #[doc = "Move horizontally to avoid threat"]
1772    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1773    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1774    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1775    #[doc = "Aircraft to fly directly back to its launch point"]
1776    MAV_COLLISION_ACTION_RTL = 5,
1777    #[doc = "Aircraft to stop in place"]
1778    MAV_COLLISION_ACTION_HOVER = 6,
1779}
1780impl MavCollisionAction {
1781    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1782}
1783impl Default for MavCollisionAction {
1784    fn default() -> Self {
1785        Self::DEFAULT
1786    }
1787}
1788#[cfg_attr(feature = "ts", derive(TS))]
1789#[cfg_attr(feature = "ts", ts(export))]
1790#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1792#[cfg_attr(feature = "serde", serde(tag = "type"))]
1793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1794#[repr(u32)]
1795#[doc = "Source of information about this collision."]
1796pub enum MavCollisionSrc {
1797    #[doc = "ID field references ADSB_VEHICLE packets"]
1798    MAV_COLLISION_SRC_ADSB = 0,
1799    #[doc = "ID field references MAVLink SRC ID"]
1800    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1801}
1802impl MavCollisionSrc {
1803    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1804}
1805impl Default for MavCollisionSrc {
1806    fn default() -> Self {
1807        Self::DEFAULT
1808    }
1809}
1810#[cfg_attr(feature = "ts", derive(TS))]
1811#[cfg_attr(feature = "ts", ts(export))]
1812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1814#[cfg_attr(feature = "serde", serde(tag = "type"))]
1815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1816#[repr(u32)]
1817#[doc = "Aircraft-rated danger from this threat."]
1818pub enum MavCollisionThreatLevel {
1819    #[doc = "Not a threat"]
1820    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1821    #[doc = "Craft is mildly concerned about this threat"]
1822    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1823    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1824    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1825}
1826impl MavCollisionThreatLevel {
1827    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1828}
1829impl Default for MavCollisionThreatLevel {
1830    fn default() -> Self {
1831        Self::DEFAULT
1832    }
1833}
1834#[cfg_attr(feature = "ts", derive(TS))]
1835#[cfg_attr(feature = "ts", ts(export))]
1836#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1838#[cfg_attr(feature = "serde", serde(tag = "type"))]
1839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1840#[repr(u32)]
1841#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1842pub enum MavComponent {
1843    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1844    MAV_COMP_ID_ALL = 0,
1845    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1846    MAV_COMP_ID_AUTOPILOT1 = 1,
1847    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1848    MAV_COMP_ID_USER1 = 25,
1849    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1850    MAV_COMP_ID_USER2 = 26,
1851    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1852    MAV_COMP_ID_USER3 = 27,
1853    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1854    MAV_COMP_ID_USER4 = 28,
1855    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1856    MAV_COMP_ID_USER5 = 29,
1857    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1858    MAV_COMP_ID_USER6 = 30,
1859    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1860    MAV_COMP_ID_USER7 = 31,
1861    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1862    MAV_COMP_ID_USER8 = 32,
1863    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1864    MAV_COMP_ID_USER9 = 33,
1865    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1866    MAV_COMP_ID_USER10 = 34,
1867    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1868    MAV_COMP_ID_USER11 = 35,
1869    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1870    MAV_COMP_ID_USER12 = 36,
1871    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1872    MAV_COMP_ID_USER13 = 37,
1873    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1874    MAV_COMP_ID_USER14 = 38,
1875    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1876    MAV_COMP_ID_USER15 = 39,
1877    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1878    MAV_COMP_ID_USER16 = 40,
1879    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1880    MAV_COMP_ID_USER17 = 41,
1881    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1882    MAV_COMP_ID_USER18 = 42,
1883    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1884    MAV_COMP_ID_USER19 = 43,
1885    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1886    MAV_COMP_ID_USER20 = 44,
1887    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1888    MAV_COMP_ID_USER21 = 45,
1889    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1890    MAV_COMP_ID_USER22 = 46,
1891    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1892    MAV_COMP_ID_USER23 = 47,
1893    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1894    MAV_COMP_ID_USER24 = 48,
1895    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1896    MAV_COMP_ID_USER25 = 49,
1897    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1898    MAV_COMP_ID_USER26 = 50,
1899    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1900    MAV_COMP_ID_USER27 = 51,
1901    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1902    MAV_COMP_ID_USER28 = 52,
1903    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1904    MAV_COMP_ID_USER29 = 53,
1905    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1906    MAV_COMP_ID_USER30 = 54,
1907    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1908    MAV_COMP_ID_USER31 = 55,
1909    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1910    MAV_COMP_ID_USER32 = 56,
1911    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1912    MAV_COMP_ID_USER33 = 57,
1913    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1914    MAV_COMP_ID_USER34 = 58,
1915    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1916    MAV_COMP_ID_USER35 = 59,
1917    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1918    MAV_COMP_ID_USER36 = 60,
1919    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1920    MAV_COMP_ID_USER37 = 61,
1921    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1922    MAV_COMP_ID_USER38 = 62,
1923    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1924    MAV_COMP_ID_USER39 = 63,
1925    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1926    MAV_COMP_ID_USER40 = 64,
1927    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1928    MAV_COMP_ID_USER41 = 65,
1929    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1930    MAV_COMP_ID_USER42 = 66,
1931    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1932    MAV_COMP_ID_USER43 = 67,
1933    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1934    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1935    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1936    MAV_COMP_ID_USER45 = 69,
1937    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1938    MAV_COMP_ID_USER46 = 70,
1939    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1940    MAV_COMP_ID_USER47 = 71,
1941    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1942    MAV_COMP_ID_USER48 = 72,
1943    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1944    MAV_COMP_ID_USER49 = 73,
1945    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1946    MAV_COMP_ID_USER50 = 74,
1947    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1948    MAV_COMP_ID_USER51 = 75,
1949    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1950    MAV_COMP_ID_USER52 = 76,
1951    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1952    MAV_COMP_ID_USER53 = 77,
1953    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1954    MAV_COMP_ID_USER54 = 78,
1955    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1956    MAV_COMP_ID_USER55 = 79,
1957    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1958    MAV_COMP_ID_USER56 = 80,
1959    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1960    MAV_COMP_ID_USER57 = 81,
1961    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1962    MAV_COMP_ID_USER58 = 82,
1963    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1964    MAV_COMP_ID_USER59 = 83,
1965    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1966    MAV_COMP_ID_USER60 = 84,
1967    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1968    MAV_COMP_ID_USER61 = 85,
1969    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1970    MAV_COMP_ID_USER62 = 86,
1971    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1972    MAV_COMP_ID_USER63 = 87,
1973    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1974    MAV_COMP_ID_USER64 = 88,
1975    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1976    MAV_COMP_ID_USER65 = 89,
1977    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1978    MAV_COMP_ID_USER66 = 90,
1979    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1980    MAV_COMP_ID_USER67 = 91,
1981    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1982    MAV_COMP_ID_USER68 = 92,
1983    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1984    MAV_COMP_ID_USER69 = 93,
1985    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1986    MAV_COMP_ID_USER70 = 94,
1987    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1988    MAV_COMP_ID_USER71 = 95,
1989    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1990    MAV_COMP_ID_USER72 = 96,
1991    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1992    MAV_COMP_ID_USER73 = 97,
1993    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1994    MAV_COMP_ID_USER74 = 98,
1995    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1996    MAV_COMP_ID_USER75 = 99,
1997    #[doc = "Camera #1."]
1998    MAV_COMP_ID_CAMERA = 100,
1999    #[doc = "Camera #2."]
2000    MAV_COMP_ID_CAMERA2 = 101,
2001    #[doc = "Camera #3."]
2002    MAV_COMP_ID_CAMERA3 = 102,
2003    #[doc = "Camera #4."]
2004    MAV_COMP_ID_CAMERA4 = 103,
2005    #[doc = "Camera #5."]
2006    MAV_COMP_ID_CAMERA5 = 104,
2007    #[doc = "Camera #6."]
2008    MAV_COMP_ID_CAMERA6 = 105,
2009    #[doc = "Servo #1."]
2010    MAV_COMP_ID_SERVO1 = 140,
2011    #[doc = "Servo #2."]
2012    MAV_COMP_ID_SERVO2 = 141,
2013    #[doc = "Servo #3."]
2014    MAV_COMP_ID_SERVO3 = 142,
2015    #[doc = "Servo #4."]
2016    MAV_COMP_ID_SERVO4 = 143,
2017    #[doc = "Servo #5."]
2018    MAV_COMP_ID_SERVO5 = 144,
2019    #[doc = "Servo #6."]
2020    MAV_COMP_ID_SERVO6 = 145,
2021    #[doc = "Servo #7."]
2022    MAV_COMP_ID_SERVO7 = 146,
2023    #[doc = "Servo #8."]
2024    MAV_COMP_ID_SERVO8 = 147,
2025    #[doc = "Servo #9."]
2026    MAV_COMP_ID_SERVO9 = 148,
2027    #[doc = "Servo #10."]
2028    MAV_COMP_ID_SERVO10 = 149,
2029    #[doc = "Servo #11."]
2030    MAV_COMP_ID_SERVO11 = 150,
2031    #[doc = "Servo #12."]
2032    MAV_COMP_ID_SERVO12 = 151,
2033    #[doc = "Servo #13."]
2034    MAV_COMP_ID_SERVO13 = 152,
2035    #[doc = "Servo #14."]
2036    MAV_COMP_ID_SERVO14 = 153,
2037    #[doc = "Gimbal #1."]
2038    MAV_COMP_ID_GIMBAL = 154,
2039    #[doc = "Logging component."]
2040    MAV_COMP_ID_LOG = 155,
2041    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2042    MAV_COMP_ID_ADSB = 156,
2043    #[doc = "On Screen Display (OSD) devices for video links."]
2044    MAV_COMP_ID_OSD = 157,
2045    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2046    MAV_COMP_ID_PERIPHERAL = 158,
2047    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2048    #[doc = "Gimbal ID for QX1."]
2049    MAV_COMP_ID_QX1_GIMBAL = 159,
2050    #[doc = "FLARM collision alert component."]
2051    MAV_COMP_ID_FLARM = 160,
2052    #[doc = "Parachute component."]
2053    MAV_COMP_ID_PARACHUTE = 161,
2054    #[doc = "Winch component."]
2055    MAV_COMP_ID_WINCH = 169,
2056    #[doc = "Gimbal #2."]
2057    MAV_COMP_ID_GIMBAL2 = 171,
2058    #[doc = "Gimbal #3."]
2059    MAV_COMP_ID_GIMBAL3 = 172,
2060    #[doc = "Gimbal #4"]
2061    MAV_COMP_ID_GIMBAL4 = 173,
2062    #[doc = "Gimbal #5."]
2063    MAV_COMP_ID_GIMBAL5 = 174,
2064    #[doc = "Gimbal #6."]
2065    MAV_COMP_ID_GIMBAL6 = 175,
2066    #[doc = "Battery #1."]
2067    MAV_COMP_ID_BATTERY = 180,
2068    #[doc = "Battery #2."]
2069    MAV_COMP_ID_BATTERY2 = 181,
2070    #[doc = "CAN over MAVLink client."]
2071    MAV_COMP_ID_MAVCAN = 189,
2072    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2073    MAV_COMP_ID_MISSIONPLANNER = 190,
2074    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2075    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2076    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2077    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2078    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2079    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2080    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2081    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2082    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2083    MAV_COMP_ID_PATHPLANNER = 195,
2084    #[doc = "Component that plans a collision free path between two points."]
2085    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2086    #[doc = "Component that provides position estimates using VIO techniques."]
2087    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2088    #[doc = "Component that manages pairing of vehicle and GCS."]
2089    MAV_COMP_ID_PAIRING_MANAGER = 198,
2090    #[doc = "Inertial Measurement Unit (IMU) #1."]
2091    MAV_COMP_ID_IMU = 200,
2092    #[doc = "Inertial Measurement Unit (IMU) #2."]
2093    MAV_COMP_ID_IMU_2 = 201,
2094    #[doc = "Inertial Measurement Unit (IMU) #3."]
2095    MAV_COMP_ID_IMU_3 = 202,
2096    #[doc = "GPS #1."]
2097    MAV_COMP_ID_GPS = 220,
2098    #[doc = "GPS #2."]
2099    MAV_COMP_ID_GPS2 = 221,
2100    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2101    MAV_COMP_ID_ODID_TXRX_1 = 236,
2102    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2103    MAV_COMP_ID_ODID_TXRX_2 = 237,
2104    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2105    MAV_COMP_ID_ODID_TXRX_3 = 238,
2106    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2107    MAV_COMP_ID_UDP_BRIDGE = 240,
2108    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2109    MAV_COMP_ID_UART_BRIDGE = 241,
2110    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2111    MAV_COMP_ID_TUNNEL_NODE = 242,
2112    #[doc = "Illuminator"]
2113    MAV_COMP_ID_ILLUMINATOR = 243,
2114    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2115    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2116    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2117}
2118impl MavComponent {
2119    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2120}
2121impl Default for MavComponent {
2122    fn default() -> Self {
2123        Self::DEFAULT
2124    }
2125}
2126#[cfg_attr(feature = "ts", derive(TS))]
2127#[cfg_attr(feature = "ts", ts(export))]
2128#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2130#[cfg_attr(feature = "serde", serde(tag = "type"))]
2131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2132#[repr(u32)]
2133#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2134#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2135pub enum MavDataStream {
2136    #[doc = "Enable all data streams"]
2137    MAV_DATA_STREAM_ALL = 0,
2138    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2139    MAV_DATA_STREAM_RAW_SENSORS = 1,
2140    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2141    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2142    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2143    MAV_DATA_STREAM_RC_CHANNELS = 3,
2144    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2145    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2146    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2147    MAV_DATA_STREAM_POSITION = 6,
2148    #[doc = "Dependent on the autopilot"]
2149    MAV_DATA_STREAM_EXTRA1 = 10,
2150    #[doc = "Dependent on the autopilot"]
2151    MAV_DATA_STREAM_EXTRA2 = 11,
2152    #[doc = "Dependent on the autopilot"]
2153    MAV_DATA_STREAM_EXTRA3 = 12,
2154}
2155impl MavDataStream {
2156    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2157}
2158impl Default for MavDataStream {
2159    fn default() -> Self {
2160        Self::DEFAULT
2161    }
2162}
2163#[cfg_attr(feature = "ts", derive(TS))]
2164#[cfg_attr(feature = "ts", ts(export))]
2165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2167#[cfg_attr(feature = "serde", serde(tag = "type"))]
2168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2169#[repr(u32)]
2170#[doc = "Enumeration of distance sensor types"]
2171pub enum MavDistanceSensor {
2172    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2173    MAV_DISTANCE_SENSOR_LASER = 0,
2174    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2175    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2176    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2177    MAV_DISTANCE_SENSOR_INFRARED = 2,
2178    #[doc = "Radar type, e.g. uLanding units"]
2179    MAV_DISTANCE_SENSOR_RADAR = 3,
2180    #[doc = "Broken or unknown type, e.g. analog units"]
2181    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2182}
2183impl MavDistanceSensor {
2184    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2185}
2186impl Default for MavDistanceSensor {
2187    fn default() -> Self {
2188        Self::DEFAULT
2189    }
2190}
2191#[cfg_attr(feature = "ts", derive(TS))]
2192#[cfg_attr(feature = "ts", ts(export))]
2193#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2195#[cfg_attr(feature = "serde", serde(tag = "type"))]
2196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2197#[repr(u32)]
2198#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2199pub enum MavDoRepositionFlags {
2200    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2201    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2202}
2203impl MavDoRepositionFlags {
2204    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2205}
2206impl Default for MavDoRepositionFlags {
2207    fn default() -> Self {
2208        Self::DEFAULT
2209    }
2210}
2211#[cfg_attr(feature = "ts", derive(TS))]
2212#[cfg_attr(feature = "ts", ts(export))]
2213#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2215#[cfg_attr(feature = "serde", serde(tag = "type"))]
2216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2217#[repr(u32)]
2218#[doc = "Enumeration of estimator types"]
2219pub enum MavEstimatorType {
2220    #[doc = "Unknown type of the estimator."]
2221    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2222    #[doc = "This is a naive estimator without any real covariance feedback."]
2223    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2224    #[doc = "Computer vision based estimate. Might be up to scale."]
2225    MAV_ESTIMATOR_TYPE_VISION = 2,
2226    #[doc = "Visual-inertial estimate."]
2227    MAV_ESTIMATOR_TYPE_VIO = 3,
2228    #[doc = "Plain GPS estimate."]
2229    MAV_ESTIMATOR_TYPE_GPS = 4,
2230    #[doc = "Estimator integrating GPS and inertial sensing."]
2231    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2232    #[doc = "Estimate from external motion capturing system."]
2233    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2234    #[doc = "Estimator based on lidar sensor input."]
2235    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2236    #[doc = "Estimator on autopilot."]
2237    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2238}
2239impl MavEstimatorType {
2240    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2241}
2242impl Default for MavEstimatorType {
2243    fn default() -> Self {
2244        Self::DEFAULT
2245    }
2246}
2247#[cfg_attr(feature = "ts", derive(TS))]
2248#[cfg_attr(feature = "ts", ts(export))]
2249#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2251#[cfg_attr(feature = "serde", serde(tag = "type"))]
2252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2253#[repr(u32)]
2254#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2255pub enum MavEventCurrentSequenceFlags {
2256    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2257    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2258}
2259impl MavEventCurrentSequenceFlags {
2260    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2261}
2262impl Default for MavEventCurrentSequenceFlags {
2263    fn default() -> Self {
2264        Self::DEFAULT
2265    }
2266}
2267#[cfg_attr(feature = "ts", derive(TS))]
2268#[cfg_attr(feature = "ts", ts(export))]
2269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2271#[cfg_attr(feature = "serde", serde(tag = "type"))]
2272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2273#[repr(u32)]
2274#[doc = "Reason for an event error response."]
2275pub enum MavEventErrorReason {
2276    #[doc = "The requested event is not available (anymore)."]
2277    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2278}
2279impl MavEventErrorReason {
2280    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2281}
2282impl Default for MavEventErrorReason {
2283    fn default() -> Self {
2284        Self::DEFAULT
2285    }
2286}
2287#[cfg_attr(feature = "ts", derive(TS))]
2288#[cfg_attr(feature = "ts", ts(export))]
2289#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2291#[cfg_attr(feature = "serde", serde(tag = "type"))]
2292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2293#[repr(u32)]
2294#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2295pub enum MavFrame {
2296    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2297    MAV_FRAME_GLOBAL = 0,
2298    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2299    MAV_FRAME_LOCAL_NED = 1,
2300    #[doc = "NOT a coordinate frame, indicates a mission command."]
2301    MAV_FRAME_MISSION = 2,
2302    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2303    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2304    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2305    MAV_FRAME_LOCAL_ENU = 4,
2306    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2307    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2308    MAV_FRAME_GLOBAL_INT = 5,
2309    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2310    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2311    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2312    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2313    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2314    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2315    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2316    MAV_FRAME_BODY_NED = 8,
2317    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2318    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2319    MAV_FRAME_BODY_OFFSET_NED = 9,
2320    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2321    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2322    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2323    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2324    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2325    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2326    MAV_FRAME_BODY_FRD = 12,
2327    #[deprecated = "  (Deprecated since 2019-04)"]
2328    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2329    MAV_FRAME_RESERVED_13 = 13,
2330    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2331    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2332    MAV_FRAME_RESERVED_14 = 14,
2333    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2334    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2335    MAV_FRAME_RESERVED_15 = 15,
2336    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2337    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2338    MAV_FRAME_RESERVED_16 = 16,
2339    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2340    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2341    MAV_FRAME_RESERVED_17 = 17,
2342    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2343    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2344    MAV_FRAME_RESERVED_18 = 18,
2345    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2346    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2347    MAV_FRAME_RESERVED_19 = 19,
2348    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2349    MAV_FRAME_LOCAL_FRD = 20,
2350    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2351    MAV_FRAME_LOCAL_FLU = 21,
2352}
2353impl MavFrame {
2354    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2355}
2356impl Default for MavFrame {
2357    fn default() -> Self {
2358        Self::DEFAULT
2359    }
2360}
2361#[cfg_attr(feature = "ts", derive(TS))]
2362#[cfg_attr(feature = "ts", ts(export))]
2363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2365#[cfg_attr(feature = "serde", serde(tag = "type"))]
2366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2367#[repr(u32)]
2368#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2369pub enum MavFtpErr {
2370    #[doc = "None: No error"]
2371    MAV_FTP_ERR_NONE = 0,
2372    #[doc = "Fail: Unknown failure"]
2373    MAV_FTP_ERR_FAIL = 1,
2374    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2375    MAV_FTP_ERR_FAILERRNO = 2,
2376    #[doc = "InvalidDataSize: Payload size is invalid"]
2377    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2378    #[doc = "InvalidSession: Session is not currently open"]
2379    MAV_FTP_ERR_INVALIDSESSION = 4,
2380    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2381    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2382    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2383    MAV_FTP_ERR_EOF = 6,
2384    #[doc = "UnknownCommand: Unknown command / opcode"]
2385    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2386    #[doc = "FileExists: File/directory already exists"]
2387    MAV_FTP_ERR_FILEEXISTS = 8,
2388    #[doc = "FileProtected: File/directory is write protected"]
2389    MAV_FTP_ERR_FILEPROTECTED = 9,
2390    #[doc = "FileNotFound: File/directory not found"]
2391    MAV_FTP_ERR_FILENOTFOUND = 10,
2392}
2393impl MavFtpErr {
2394    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2395}
2396impl Default for MavFtpErr {
2397    fn default() -> Self {
2398        Self::DEFAULT
2399    }
2400}
2401#[cfg_attr(feature = "ts", derive(TS))]
2402#[cfg_attr(feature = "ts", ts(export))]
2403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2405#[cfg_attr(feature = "serde", serde(tag = "type"))]
2406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2407#[repr(u32)]
2408#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2409pub enum MavFtpOpcode {
2410    #[doc = "None. Ignored, always ACKed"]
2411    MAV_FTP_OPCODE_NONE = 0,
2412    #[doc = "TerminateSession: Terminates open Read session"]
2413    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2414    #[doc = "ResetSessions: Terminates all open read sessions"]
2415    MAV_FTP_OPCODE_RESETSESSION = 2,
2416    #[doc = "ListDirectory. List files and directories in path from offset"]
2417    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2418    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2419    MAV_FTP_OPCODE_OPENFILERO = 4,
2420    #[doc = "ReadFile: Reads size bytes from offset in session"]
2421    MAV_FTP_OPCODE_READFILE = 5,
2422    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2423    MAV_FTP_OPCODE_CREATEFILE = 6,
2424    #[doc = "WriteFile: Writes size bytes to offset in session"]
2425    MAV_FTP_OPCODE_WRITEFILE = 7,
2426    #[doc = "RemoveFile: Remove file at path"]
2427    MAV_FTP_OPCODE_REMOVEFILE = 8,
2428    #[doc = "CreateDirectory: Creates directory at path"]
2429    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2430    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2431    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2432    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2433    MAV_FTP_OPCODE_OPENFILEWO = 11,
2434    #[doc = "TruncateFile: Truncate file at path to offset length"]
2435    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2436    #[doc = "Rename: Rename path1 to path2"]
2437    MAV_FTP_OPCODE_RENAME = 13,
2438    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2439    MAV_FTP_OPCODE_CALCFILECRC = 14,
2440    #[doc = "BurstReadFile: Burst download session file"]
2441    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2442    #[doc = "ACK: ACK response"]
2443    MAV_FTP_OPCODE_ACK = 128,
2444    #[doc = "NAK: NAK response"]
2445    MAV_FTP_OPCODE_NAK = 129,
2446}
2447impl MavFtpOpcode {
2448    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2449}
2450impl Default for MavFtpOpcode {
2451    fn default() -> Self {
2452        Self::DEFAULT
2453    }
2454}
2455#[cfg_attr(feature = "ts", derive(TS))]
2456#[cfg_attr(feature = "ts", ts(export))]
2457#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2459#[cfg_attr(feature = "serde", serde(tag = "type"))]
2460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2461#[repr(u32)]
2462#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2463pub enum MavFuelType {
2464    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2465    MAV_FUEL_TYPE_UNKNOWN = 0,
2466    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2467    MAV_FUEL_TYPE_LIQUID = 1,
2468    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2469    MAV_FUEL_TYPE_GAS = 2,
2470}
2471impl MavFuelType {
2472    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2473}
2474impl Default for MavFuelType {
2475    fn default() -> Self {
2476        Self::DEFAULT
2477    }
2478}
2479bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2480impl MavGeneratorStatusFlag {
2481    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2482}
2483impl Default for MavGeneratorStatusFlag {
2484    fn default() -> Self {
2485        Self::DEFAULT
2486    }
2487}
2488#[cfg_attr(feature = "ts", derive(TS))]
2489#[cfg_attr(feature = "ts", ts(export))]
2490#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2492#[cfg_attr(feature = "serde", serde(tag = "type"))]
2493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2494#[repr(u32)]
2495#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2496pub enum MavGoto {
2497    #[doc = "Hold at the current position."]
2498    MAV_GOTO_DO_HOLD = 0,
2499    #[doc = "Continue with the next item in mission execution."]
2500    MAV_GOTO_DO_CONTINUE = 1,
2501    #[doc = "Hold at the current position of the system"]
2502    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2503    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2504    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2505}
2506impl MavGoto {
2507    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2508}
2509impl Default for MavGoto {
2510    fn default() -> Self {
2511        Self::DEFAULT
2512    }
2513}
2514#[cfg_attr(feature = "ts", derive(TS))]
2515#[cfg_attr(feature = "ts", ts(export))]
2516#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2517#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2518#[cfg_attr(feature = "serde", serde(tag = "type"))]
2519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2520#[repr(u32)]
2521#[doc = "Enumeration of landed detector states"]
2522pub enum MavLandedState {
2523    #[doc = "MAV landed state is unknown"]
2524    MAV_LANDED_STATE_UNDEFINED = 0,
2525    #[doc = "MAV is landed (on ground)"]
2526    MAV_LANDED_STATE_ON_GROUND = 1,
2527    #[doc = "MAV is in air"]
2528    MAV_LANDED_STATE_IN_AIR = 2,
2529    #[doc = "MAV currently taking off"]
2530    MAV_LANDED_STATE_TAKEOFF = 3,
2531    #[doc = "MAV currently landing"]
2532    MAV_LANDED_STATE_LANDING = 4,
2533}
2534impl MavLandedState {
2535    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2536}
2537impl Default for MavLandedState {
2538    fn default() -> Self {
2539        Self::DEFAULT
2540    }
2541}
2542#[cfg_attr(feature = "ts", derive(TS))]
2543#[cfg_attr(feature = "ts", ts(export))]
2544#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2546#[cfg_attr(feature = "serde", serde(tag = "type"))]
2547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2548#[repr(u32)]
2549#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2550pub enum MavMissionResult {
2551    #[doc = "mission accepted OK"]
2552    MAV_MISSION_ACCEPTED = 0,
2553    #[doc = "Generic error / not accepting mission commands at all right now."]
2554    MAV_MISSION_ERROR = 1,
2555    #[doc = "Coordinate frame is not supported."]
2556    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2557    #[doc = "Command is not supported."]
2558    MAV_MISSION_UNSUPPORTED = 3,
2559    #[doc = "Mission items exceed storage space."]
2560    MAV_MISSION_NO_SPACE = 4,
2561    #[doc = "One of the parameters has an invalid value."]
2562    MAV_MISSION_INVALID = 5,
2563    #[doc = "param1 has an invalid value."]
2564    MAV_MISSION_INVALID_PARAM1 = 6,
2565    #[doc = "param2 has an invalid value."]
2566    MAV_MISSION_INVALID_PARAM2 = 7,
2567    #[doc = "param3 has an invalid value."]
2568    MAV_MISSION_INVALID_PARAM3 = 8,
2569    #[doc = "param4 has an invalid value."]
2570    MAV_MISSION_INVALID_PARAM4 = 9,
2571    #[doc = "x / param5 has an invalid value."]
2572    MAV_MISSION_INVALID_PARAM5_X = 10,
2573    #[doc = "y / param6 has an invalid value."]
2574    MAV_MISSION_INVALID_PARAM6_Y = 11,
2575    #[doc = "z / param7 has an invalid value."]
2576    MAV_MISSION_INVALID_PARAM7 = 12,
2577    #[doc = "Mission item received out of sequence"]
2578    MAV_MISSION_INVALID_SEQUENCE = 13,
2579    #[doc = "Not accepting any mission commands from this communication partner."]
2580    MAV_MISSION_DENIED = 14,
2581    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2582    MAV_MISSION_OPERATION_CANCELLED = 15,
2583}
2584impl MavMissionResult {
2585    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2586}
2587impl Default for MavMissionResult {
2588    fn default() -> Self {
2589        Self::DEFAULT
2590    }
2591}
2592#[cfg_attr(feature = "ts", derive(TS))]
2593#[cfg_attr(feature = "ts", ts(export))]
2594#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2596#[cfg_attr(feature = "serde", serde(tag = "type"))]
2597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2598#[repr(u32)]
2599#[doc = "Type of mission items being requested/sent in mission protocol."]
2600pub enum MavMissionType {
2601    #[doc = "Items are mission commands for main mission."]
2602    MAV_MISSION_TYPE_MISSION = 0,
2603    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2604    MAV_MISSION_TYPE_FENCE = 1,
2605    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2606    MAV_MISSION_TYPE_RALLY = 2,
2607    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2608    MAV_MISSION_TYPE_ALL = 255,
2609}
2610impl MavMissionType {
2611    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2612}
2613impl Default for MavMissionType {
2614    fn default() -> Self {
2615        Self::DEFAULT
2616    }
2617}
2618#[cfg_attr(feature = "ts", derive(TS))]
2619#[cfg_attr(feature = "ts", ts(export))]
2620#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2622#[cfg_attr(feature = "serde", serde(tag = "type"))]
2623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2624#[repr(u32)]
2625#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2626pub enum MavMode {
2627    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2628    MAV_MODE_PREFLIGHT = 0,
2629    #[doc = "System is allowed to be active, under assisted RC control."]
2630    MAV_MODE_STABILIZE_DISARMED = 80,
2631    #[doc = "System is allowed to be active, under assisted RC control."]
2632    MAV_MODE_STABILIZE_ARMED = 208,
2633    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2634    MAV_MODE_MANUAL_DISARMED = 64,
2635    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2636    MAV_MODE_MANUAL_ARMED = 192,
2637    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2638    MAV_MODE_GUIDED_DISARMED = 88,
2639    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2640    MAV_MODE_GUIDED_ARMED = 216,
2641    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2642    MAV_MODE_AUTO_DISARMED = 92,
2643    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2644    MAV_MODE_AUTO_ARMED = 220,
2645    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2646    MAV_MODE_TEST_DISARMED = 66,
2647    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2648    MAV_MODE_TEST_ARMED = 194,
2649}
2650impl MavMode {
2651    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2652}
2653impl Default for MavMode {
2654    fn default() -> Self {
2655        Self::DEFAULT
2656    }
2657}
2658bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2659impl MavModeFlag {
2660    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2661}
2662impl Default for MavModeFlag {
2663    fn default() -> Self {
2664        Self::DEFAULT
2665    }
2666}
2667#[cfg_attr(feature = "ts", derive(TS))]
2668#[cfg_attr(feature = "ts", ts(export))]
2669#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2671#[cfg_attr(feature = "serde", serde(tag = "type"))]
2672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2673#[repr(u32)]
2674#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2675pub enum MavModeFlagDecodePosition {
2676    #[doc = "First bit:  10000000"]
2677    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2678    #[doc = "Second bit: 01000000"]
2679    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2680    #[doc = "Third bit:  00100000"]
2681    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2682    #[doc = "Fourth bit: 00010000"]
2683    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2684    #[doc = "Fifth bit:  00001000"]
2685    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2686    #[doc = "Sixth bit:   00000100"]
2687    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2688    #[doc = "Seventh bit: 00000010"]
2689    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2690    #[doc = "Eighth bit: 00000001"]
2691    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2692}
2693impl MavModeFlagDecodePosition {
2694    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2695}
2696impl Default for MavModeFlagDecodePosition {
2697    fn default() -> Self {
2698        Self::DEFAULT
2699    }
2700}
2701bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2702impl MavModeProperty {
2703    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2704}
2705impl Default for MavModeProperty {
2706    fn default() -> Self {
2707        Self::DEFAULT
2708    }
2709}
2710#[cfg_attr(feature = "ts", derive(TS))]
2711#[cfg_attr(feature = "ts", ts(export))]
2712#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2714#[cfg_attr(feature = "serde", serde(tag = "type"))]
2715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2716#[repr(u32)]
2717#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2718#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2719pub enum MavMountMode {
2720    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2721    MAV_MOUNT_MODE_RETRACT = 0,
2722    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2723    MAV_MOUNT_MODE_NEUTRAL = 1,
2724    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2725    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2726    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2727    MAV_MOUNT_MODE_RC_TARGETING = 3,
2728    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2729    MAV_MOUNT_MODE_GPS_POINT = 4,
2730    #[doc = "Gimbal tracks system with specified system ID"]
2731    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2732    #[doc = "Gimbal tracks home position"]
2733    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2734}
2735impl MavMountMode {
2736    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2737}
2738impl Default for MavMountMode {
2739    fn default() -> Self {
2740        Self::DEFAULT
2741    }
2742}
2743#[cfg_attr(feature = "ts", derive(TS))]
2744#[cfg_attr(feature = "ts", ts(export))]
2745#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2747#[cfg_attr(feature = "serde", serde(tag = "type"))]
2748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2749#[repr(u32)]
2750pub enum MavOdidArmStatus {
2751    #[doc = "Passing arming checks."]
2752    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2753    #[doc = "Generic arming failure, see error string for details."]
2754    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2755}
2756impl MavOdidArmStatus {
2757    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2758}
2759impl Default for MavOdidArmStatus {
2760    fn default() -> Self {
2761        Self::DEFAULT
2762    }
2763}
2764#[cfg_attr(feature = "ts", derive(TS))]
2765#[cfg_attr(feature = "ts", ts(export))]
2766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2768#[cfg_attr(feature = "serde", serde(tag = "type"))]
2769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2770#[repr(u32)]
2771pub enum MavOdidAuthType {
2772    #[doc = "No authentication type is specified."]
2773    MAV_ODID_AUTH_TYPE_NONE = 0,
2774    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2775    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2776    #[doc = "Signature for the Operator ID."]
2777    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2778    #[doc = "Signature for the entire message set."]
2779    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2780    #[doc = "Authentication is provided by Network Remote ID."]
2781    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2782    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2783    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2784}
2785impl MavOdidAuthType {
2786    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2787}
2788impl Default for MavOdidAuthType {
2789    fn default() -> Self {
2790        Self::DEFAULT
2791    }
2792}
2793#[cfg_attr(feature = "ts", derive(TS))]
2794#[cfg_attr(feature = "ts", ts(export))]
2795#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2797#[cfg_attr(feature = "serde", serde(tag = "type"))]
2798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2799#[repr(u32)]
2800pub enum MavOdidCategoryEu {
2801    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2802    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2803    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2804    MAV_ODID_CATEGORY_EU_OPEN = 1,
2805    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2806    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2807    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2808    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2809}
2810impl MavOdidCategoryEu {
2811    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2812}
2813impl Default for MavOdidCategoryEu {
2814    fn default() -> Self {
2815        Self::DEFAULT
2816    }
2817}
2818#[cfg_attr(feature = "ts", derive(TS))]
2819#[cfg_attr(feature = "ts", ts(export))]
2820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2822#[cfg_attr(feature = "serde", serde(tag = "type"))]
2823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2824#[repr(u32)]
2825pub enum MavOdidClassEu {
2826    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2827    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2828    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2829    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2830    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2831    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2832    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2833    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2834    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2835    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2836    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2837    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2838    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2839    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2840    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2841    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2842}
2843impl MavOdidClassEu {
2844    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2845}
2846impl Default for MavOdidClassEu {
2847    fn default() -> Self {
2848        Self::DEFAULT
2849    }
2850}
2851#[cfg_attr(feature = "ts", derive(TS))]
2852#[cfg_attr(feature = "ts", ts(export))]
2853#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2855#[cfg_attr(feature = "serde", serde(tag = "type"))]
2856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2857#[repr(u32)]
2858pub enum MavOdidClassificationType {
2859    #[doc = "The classification type for the UA is undeclared."]
2860    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2861    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2862    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2863}
2864impl MavOdidClassificationType {
2865    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2866}
2867impl Default for MavOdidClassificationType {
2868    fn default() -> Self {
2869        Self::DEFAULT
2870    }
2871}
2872#[cfg_attr(feature = "ts", derive(TS))]
2873#[cfg_attr(feature = "ts", ts(export))]
2874#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2876#[cfg_attr(feature = "serde", serde(tag = "type"))]
2877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2878#[repr(u32)]
2879pub enum MavOdidDescType {
2880    #[doc = "Optional free-form text description of the purpose of the flight."]
2881    MAV_ODID_DESC_TYPE_TEXT = 0,
2882    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2883    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2884    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2885    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2886}
2887impl MavOdidDescType {
2888    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2889}
2890impl Default for MavOdidDescType {
2891    fn default() -> Self {
2892        Self::DEFAULT
2893    }
2894}
2895#[cfg_attr(feature = "ts", derive(TS))]
2896#[cfg_attr(feature = "ts", ts(export))]
2897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2899#[cfg_attr(feature = "serde", serde(tag = "type"))]
2900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2901#[repr(u32)]
2902pub enum MavOdidHeightRef {
2903    #[doc = "The height field is relative to the take-off location."]
2904    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2905    #[doc = "The height field is relative to ground."]
2906    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2907}
2908impl MavOdidHeightRef {
2909    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2910}
2911impl Default for MavOdidHeightRef {
2912    fn default() -> Self {
2913        Self::DEFAULT
2914    }
2915}
2916#[cfg_attr(feature = "ts", derive(TS))]
2917#[cfg_attr(feature = "ts", ts(export))]
2918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2920#[cfg_attr(feature = "serde", serde(tag = "type"))]
2921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2922#[repr(u32)]
2923pub enum MavOdidHorAcc {
2924    #[doc = "The horizontal accuracy is unknown."]
2925    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2926    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2927    MAV_ODID_HOR_ACC_10NM = 1,
2928    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2929    MAV_ODID_HOR_ACC_4NM = 2,
2930    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2931    MAV_ODID_HOR_ACC_2NM = 3,
2932    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2933    MAV_ODID_HOR_ACC_1NM = 4,
2934    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2935    MAV_ODID_HOR_ACC_0_5NM = 5,
2936    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2937    MAV_ODID_HOR_ACC_0_3NM = 6,
2938    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2939    MAV_ODID_HOR_ACC_0_1NM = 7,
2940    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2941    MAV_ODID_HOR_ACC_0_05NM = 8,
2942    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2943    MAV_ODID_HOR_ACC_30_METER = 9,
2944    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2945    MAV_ODID_HOR_ACC_10_METER = 10,
2946    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2947    MAV_ODID_HOR_ACC_3_METER = 11,
2948    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2949    MAV_ODID_HOR_ACC_1_METER = 12,
2950}
2951impl MavOdidHorAcc {
2952    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2953}
2954impl Default for MavOdidHorAcc {
2955    fn default() -> Self {
2956        Self::DEFAULT
2957    }
2958}
2959#[cfg_attr(feature = "ts", derive(TS))]
2960#[cfg_attr(feature = "ts", ts(export))]
2961#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2963#[cfg_attr(feature = "serde", serde(tag = "type"))]
2964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2965#[repr(u32)]
2966pub enum MavOdidIdType {
2967    #[doc = "No type defined."]
2968    MAV_ODID_ID_TYPE_NONE = 0,
2969    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2970    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2971    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2972    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2973    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2974    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2975    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2976    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2977}
2978impl MavOdidIdType {
2979    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2980}
2981impl Default for MavOdidIdType {
2982    fn default() -> Self {
2983        Self::DEFAULT
2984    }
2985}
2986#[cfg_attr(feature = "ts", derive(TS))]
2987#[cfg_attr(feature = "ts", ts(export))]
2988#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2990#[cfg_attr(feature = "serde", serde(tag = "type"))]
2991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2992#[repr(u32)]
2993pub enum MavOdidOperatorIdType {
2994    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2995    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2996}
2997impl MavOdidOperatorIdType {
2998    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2999}
3000impl Default for MavOdidOperatorIdType {
3001    fn default() -> Self {
3002        Self::DEFAULT
3003    }
3004}
3005#[cfg_attr(feature = "ts", derive(TS))]
3006#[cfg_attr(feature = "ts", ts(export))]
3007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3009#[cfg_attr(feature = "serde", serde(tag = "type"))]
3010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3011#[repr(u32)]
3012pub enum MavOdidOperatorLocationType {
3013    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3014    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3015    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3016    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3017    #[doc = "The location/altitude of the operator are fixed values."]
3018    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3019}
3020impl MavOdidOperatorLocationType {
3021    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3022}
3023impl Default for MavOdidOperatorLocationType {
3024    fn default() -> Self {
3025        Self::DEFAULT
3026    }
3027}
3028#[cfg_attr(feature = "ts", derive(TS))]
3029#[cfg_attr(feature = "ts", ts(export))]
3030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3032#[cfg_attr(feature = "serde", serde(tag = "type"))]
3033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3034#[repr(u32)]
3035pub enum MavOdidSpeedAcc {
3036    #[doc = "The speed accuracy is unknown."]
3037    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3038    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3039    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3040    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3041    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3042    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3043    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3044    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3045    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3046}
3047impl MavOdidSpeedAcc {
3048    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3049}
3050impl Default for MavOdidSpeedAcc {
3051    fn default() -> Self {
3052        Self::DEFAULT
3053    }
3054}
3055#[cfg_attr(feature = "ts", derive(TS))]
3056#[cfg_attr(feature = "ts", ts(export))]
3057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3059#[cfg_attr(feature = "serde", serde(tag = "type"))]
3060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3061#[repr(u32)]
3062pub enum MavOdidStatus {
3063    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3064    MAV_ODID_STATUS_UNDECLARED = 0,
3065    #[doc = "The UA is on the ground."]
3066    MAV_ODID_STATUS_GROUND = 1,
3067    #[doc = "The UA is in the air."]
3068    MAV_ODID_STATUS_AIRBORNE = 2,
3069    #[doc = "The UA is having an emergency."]
3070    MAV_ODID_STATUS_EMERGENCY = 3,
3071    #[doc = "The remote ID system is failing or unreliable in some way."]
3072    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3073}
3074impl MavOdidStatus {
3075    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3076}
3077impl Default for MavOdidStatus {
3078    fn default() -> Self {
3079        Self::DEFAULT
3080    }
3081}
3082#[cfg_attr(feature = "ts", derive(TS))]
3083#[cfg_attr(feature = "ts", ts(export))]
3084#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3086#[cfg_attr(feature = "serde", serde(tag = "type"))]
3087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3088#[repr(u32)]
3089pub enum MavOdidTimeAcc {
3090    #[doc = "The timestamp accuracy is unknown."]
3091    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3092    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3093    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3094    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3095    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3096    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3097    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3098    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3099    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3100    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3101    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3102    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3103    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3104    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3105    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3106    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3107    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3108    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3109    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3110    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3111    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3112    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3113    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3114    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3115    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3116    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3117    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3118    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3119    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3120    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3121    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3122}
3123impl MavOdidTimeAcc {
3124    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3125}
3126impl Default for MavOdidTimeAcc {
3127    fn default() -> Self {
3128        Self::DEFAULT
3129    }
3130}
3131#[cfg_attr(feature = "ts", derive(TS))]
3132#[cfg_attr(feature = "ts", ts(export))]
3133#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3135#[cfg_attr(feature = "serde", serde(tag = "type"))]
3136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3137#[repr(u32)]
3138pub enum MavOdidUaType {
3139    #[doc = "No UA (Unmanned Aircraft) type defined."]
3140    MAV_ODID_UA_TYPE_NONE = 0,
3141    #[doc = "Aeroplane/Airplane. Fixed wing."]
3142    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3143    #[doc = "Helicopter or multirotor."]
3144    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3145    #[doc = "Gyroplane."]
3146    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3147    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3148    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3149    #[doc = "Ornithopter."]
3150    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3151    #[doc = "Glider."]
3152    MAV_ODID_UA_TYPE_GLIDER = 6,
3153    #[doc = "Kite."]
3154    MAV_ODID_UA_TYPE_KITE = 7,
3155    #[doc = "Free Balloon."]
3156    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3157    #[doc = "Captive Balloon."]
3158    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3159    #[doc = "Airship. E.g. a blimp."]
3160    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3161    #[doc = "Free Fall/Parachute (unpowered)."]
3162    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3163    #[doc = "Rocket."]
3164    MAV_ODID_UA_TYPE_ROCKET = 12,
3165    #[doc = "Tethered powered aircraft."]
3166    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3167    #[doc = "Ground Obstacle."]
3168    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3169    #[doc = "Other type of aircraft not listed earlier."]
3170    MAV_ODID_UA_TYPE_OTHER = 15,
3171}
3172impl MavOdidUaType {
3173    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3174}
3175impl Default for MavOdidUaType {
3176    fn default() -> Self {
3177        Self::DEFAULT
3178    }
3179}
3180#[cfg_attr(feature = "ts", derive(TS))]
3181#[cfg_attr(feature = "ts", ts(export))]
3182#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3184#[cfg_attr(feature = "serde", serde(tag = "type"))]
3185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3186#[repr(u32)]
3187pub enum MavOdidVerAcc {
3188    #[doc = "The vertical accuracy is unknown."]
3189    MAV_ODID_VER_ACC_UNKNOWN = 0,
3190    #[doc = "The vertical accuracy is smaller than 150 meter."]
3191    MAV_ODID_VER_ACC_150_METER = 1,
3192    #[doc = "The vertical accuracy is smaller than 45 meter."]
3193    MAV_ODID_VER_ACC_45_METER = 2,
3194    #[doc = "The vertical accuracy is smaller than 25 meter."]
3195    MAV_ODID_VER_ACC_25_METER = 3,
3196    #[doc = "The vertical accuracy is smaller than 10 meter."]
3197    MAV_ODID_VER_ACC_10_METER = 4,
3198    #[doc = "The vertical accuracy is smaller than 3 meter."]
3199    MAV_ODID_VER_ACC_3_METER = 5,
3200    #[doc = "The vertical accuracy is smaller than 1 meter."]
3201    MAV_ODID_VER_ACC_1_METER = 6,
3202}
3203impl MavOdidVerAcc {
3204    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3205}
3206impl Default for MavOdidVerAcc {
3207    fn default() -> Self {
3208        Self::DEFAULT
3209    }
3210}
3211#[cfg_attr(feature = "ts", derive(TS))]
3212#[cfg_attr(feature = "ts", ts(export))]
3213#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3215#[cfg_attr(feature = "serde", serde(tag = "type"))]
3216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3217#[repr(u32)]
3218#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3219pub enum MavParamExtType {
3220    #[doc = "8-bit unsigned integer"]
3221    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3222    #[doc = "8-bit signed integer"]
3223    MAV_PARAM_EXT_TYPE_INT8 = 2,
3224    #[doc = "16-bit unsigned integer"]
3225    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3226    #[doc = "16-bit signed integer"]
3227    MAV_PARAM_EXT_TYPE_INT16 = 4,
3228    #[doc = "32-bit unsigned integer"]
3229    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3230    #[doc = "32-bit signed integer"]
3231    MAV_PARAM_EXT_TYPE_INT32 = 6,
3232    #[doc = "64-bit unsigned integer"]
3233    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3234    #[doc = "64-bit signed integer"]
3235    MAV_PARAM_EXT_TYPE_INT64 = 8,
3236    #[doc = "32-bit floating-point"]
3237    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3238    #[doc = "64-bit floating-point"]
3239    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3240    #[doc = "Custom Type"]
3241    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3242}
3243impl MavParamExtType {
3244    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3245}
3246impl Default for MavParamExtType {
3247    fn default() -> Self {
3248        Self::DEFAULT
3249    }
3250}
3251#[cfg_attr(feature = "ts", derive(TS))]
3252#[cfg_attr(feature = "ts", ts(export))]
3253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3255#[cfg_attr(feature = "serde", serde(tag = "type"))]
3256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3257#[repr(u32)]
3258#[doc = "Specifies the datatype of a MAVLink parameter."]
3259pub enum MavParamType {
3260    #[doc = "8-bit unsigned integer"]
3261    MAV_PARAM_TYPE_UINT8 = 1,
3262    #[doc = "8-bit signed integer"]
3263    MAV_PARAM_TYPE_INT8 = 2,
3264    #[doc = "16-bit unsigned integer"]
3265    MAV_PARAM_TYPE_UINT16 = 3,
3266    #[doc = "16-bit signed integer"]
3267    MAV_PARAM_TYPE_INT16 = 4,
3268    #[doc = "32-bit unsigned integer"]
3269    MAV_PARAM_TYPE_UINT32 = 5,
3270    #[doc = "32-bit signed integer"]
3271    MAV_PARAM_TYPE_INT32 = 6,
3272    #[doc = "64-bit unsigned integer"]
3273    MAV_PARAM_TYPE_UINT64 = 7,
3274    #[doc = "64-bit signed integer"]
3275    MAV_PARAM_TYPE_INT64 = 8,
3276    #[doc = "32-bit floating-point"]
3277    MAV_PARAM_TYPE_REAL32 = 9,
3278    #[doc = "64-bit floating-point"]
3279    MAV_PARAM_TYPE_REAL64 = 10,
3280}
3281impl MavParamType {
3282    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3283}
3284impl Default for MavParamType {
3285    fn default() -> Self {
3286        Self::DEFAULT
3287    }
3288}
3289bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3290impl MavPowerStatus {
3291    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3292}
3293impl Default for MavPowerStatus {
3294    fn default() -> Self {
3295        Self::DEFAULT
3296    }
3297}
3298bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3299impl MavProtocolCapability {
3300    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3301}
3302impl Default for MavProtocolCapability {
3303    fn default() -> Self {
3304        Self::DEFAULT
3305    }
3306}
3307#[cfg_attr(feature = "ts", derive(TS))]
3308#[cfg_attr(feature = "ts", ts(export))]
3309#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3311#[cfg_attr(feature = "serde", serde(tag = "type"))]
3312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3313#[repr(u32)]
3314#[doc = "Result from a MAVLink command (MAV_CMD)"]
3315pub enum MavResult {
3316    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3317    MAV_RESULT_ACCEPTED = 0,
3318    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3319    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3320    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3321    MAV_RESULT_DENIED = 2,
3322    #[doc = "Command is not supported (unknown)."]
3323    MAV_RESULT_UNSUPPORTED = 3,
3324    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3325    MAV_RESULT_FAILED = 4,
3326    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3327    MAV_RESULT_IN_PROGRESS = 5,
3328    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3329    MAV_RESULT_CANCELLED = 6,
3330    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3331    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3332    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3333    MAV_RESULT_COMMAND_INT_ONLY = 8,
3334    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3335    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3336}
3337impl MavResult {
3338    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3339}
3340impl Default for MavResult {
3341    fn default() -> Self {
3342        Self::DEFAULT
3343    }
3344}
3345#[cfg_attr(feature = "ts", derive(TS))]
3346#[cfg_attr(feature = "ts", ts(export))]
3347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3349#[cfg_attr(feature = "serde", serde(tag = "type"))]
3350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3351#[repr(u32)]
3352#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3353#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3354pub enum MavRoi {
3355    #[doc = "No region of interest."]
3356    MAV_ROI_NONE = 0,
3357    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3358    MAV_ROI_WPNEXT = 1,
3359    #[doc = "Point toward given waypoint."]
3360    MAV_ROI_WPINDEX = 2,
3361    #[doc = "Point toward fixed location."]
3362    MAV_ROI_LOCATION = 3,
3363    #[doc = "Point toward of given id."]
3364    MAV_ROI_TARGET = 4,
3365}
3366impl MavRoi {
3367    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3368}
3369impl Default for MavRoi {
3370    fn default() -> Self {
3371        Self::DEFAULT
3372    }
3373}
3374#[cfg_attr(feature = "ts", derive(TS))]
3375#[cfg_attr(feature = "ts", ts(export))]
3376#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3378#[cfg_attr(feature = "serde", serde(tag = "type"))]
3379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3380#[repr(u32)]
3381#[doc = "Enumeration of sensor orientation, according to its rotations"]
3382pub enum MavSensorOrientation {
3383    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3384    MAV_SENSOR_ROTATION_NONE = 0,
3385    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3386    MAV_SENSOR_ROTATION_YAW_45 = 1,
3387    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3388    MAV_SENSOR_ROTATION_YAW_90 = 2,
3389    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3390    MAV_SENSOR_ROTATION_YAW_135 = 3,
3391    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3392    MAV_SENSOR_ROTATION_YAW_180 = 4,
3393    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3394    MAV_SENSOR_ROTATION_YAW_225 = 5,
3395    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3396    MAV_SENSOR_ROTATION_YAW_270 = 6,
3397    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3398    MAV_SENSOR_ROTATION_YAW_315 = 7,
3399    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3400    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3401    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3402    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3403    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3404    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3405    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3406    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3407    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3408    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3409    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3410    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3411    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3412    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3413    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3414    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3415    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3416    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3417    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3418    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3419    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3420    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3421    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3422    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3423    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3424    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3425    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3426    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3427    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3428    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3429    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3430    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3431    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3432    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3433    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3434    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3435    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3436    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3437    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3438    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3439    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3440    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3441    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3442    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3443    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3444    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3445    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3446    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3447    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3448    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3449    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3450    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3451    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3452    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3453    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3454    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3455    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3456    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3457    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3458    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3459    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3460    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3461    #[doc = "Pitch: 315"]
3462    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3463    #[doc = "Roll: 90, Pitch: 315"]
3464    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3465    #[doc = "Custom orientation"]
3466    MAV_SENSOR_ROTATION_CUSTOM = 100,
3467}
3468impl MavSensorOrientation {
3469    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3470}
3471impl Default for MavSensorOrientation {
3472    fn default() -> Self {
3473        Self::DEFAULT
3474    }
3475}
3476#[cfg_attr(feature = "ts", derive(TS))]
3477#[cfg_attr(feature = "ts", ts(export))]
3478#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3480#[cfg_attr(feature = "serde", serde(tag = "type"))]
3481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3482#[repr(u32)]
3483#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3484pub enum MavSeverity {
3485    #[doc = "System is unusable. This is a \"panic\" condition."]
3486    MAV_SEVERITY_EMERGENCY = 0,
3487    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3488    MAV_SEVERITY_ALERT = 1,
3489    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3490    MAV_SEVERITY_CRITICAL = 2,
3491    #[doc = "Indicates an error in secondary/redundant systems."]
3492    MAV_SEVERITY_ERROR = 3,
3493    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3494    MAV_SEVERITY_WARNING = 4,
3495    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3496    MAV_SEVERITY_NOTICE = 5,
3497    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3498    MAV_SEVERITY_INFO = 6,
3499    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3500    MAV_SEVERITY_DEBUG = 7,
3501}
3502impl MavSeverity {
3503    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3504}
3505impl Default for MavSeverity {
3506    fn default() -> Self {
3507        Self::DEFAULT
3508    }
3509}
3510#[cfg_attr(feature = "ts", derive(TS))]
3511#[cfg_attr(feature = "ts", ts(export))]
3512#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3514#[cfg_attr(feature = "serde", serde(tag = "type"))]
3515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3516#[repr(u32)]
3517#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3518pub enum MavStandardMode {
3519    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3520    MAV_STANDARD_MODE_NON_STANDARD = 0,
3521    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3522    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3523    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3524    MAV_STANDARD_MODE_ORBIT = 2,
3525    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3526    MAV_STANDARD_MODE_CRUISE = 3,
3527    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3528    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3529    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3530    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3531    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3532    MAV_STANDARD_MODE_MISSION = 6,
3533    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3534    MAV_STANDARD_MODE_LAND = 7,
3535    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3536    MAV_STANDARD_MODE_TAKEOFF = 8,
3537}
3538impl MavStandardMode {
3539    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3540}
3541impl Default for MavStandardMode {
3542    fn default() -> Self {
3543        Self::DEFAULT
3544    }
3545}
3546#[cfg_attr(feature = "ts", derive(TS))]
3547#[cfg_attr(feature = "ts", ts(export))]
3548#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3550#[cfg_attr(feature = "serde", serde(tag = "type"))]
3551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3552#[repr(u32)]
3553pub enum MavState {
3554    #[doc = "Uninitialized system, state is unknown."]
3555    MAV_STATE_UNINIT = 0,
3556    #[doc = "System is booting up."]
3557    MAV_STATE_BOOT = 1,
3558    #[doc = "System is calibrating and not flight-ready."]
3559    MAV_STATE_CALIBRATING = 2,
3560    #[doc = "System is grounded and on standby. It can be launched any time."]
3561    MAV_STATE_STANDBY = 3,
3562    #[doc = "System is active and might be already airborne. Motors are engaged."]
3563    MAV_STATE_ACTIVE = 4,
3564    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3565    MAV_STATE_CRITICAL = 5,
3566    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3567    MAV_STATE_EMERGENCY = 6,
3568    #[doc = "System just initialized its power-down sequence, will shut down now."]
3569    MAV_STATE_POWEROFF = 7,
3570    #[doc = "System is terminating itself (failsafe or commanded)."]
3571    MAV_STATE_FLIGHT_TERMINATION = 8,
3572}
3573impl MavState {
3574    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3575}
3576impl Default for MavState {
3577    fn default() -> Self {
3578        Self::DEFAULT
3579    }
3580}
3581bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3582impl MavSysStatusSensor {
3583    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3584}
3585impl Default for MavSysStatusSensor {
3586    fn default() -> Self {
3587        Self::DEFAULT
3588    }
3589}
3590bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3591impl MavSysStatusSensorExtended {
3592    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3593}
3594impl Default for MavSysStatusSensorExtended {
3595    fn default() -> Self {
3596        Self::DEFAULT
3597    }
3598}
3599#[cfg_attr(feature = "ts", derive(TS))]
3600#[cfg_attr(feature = "ts", ts(export))]
3601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3603#[cfg_attr(feature = "serde", serde(tag = "type"))]
3604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3605#[repr(u32)]
3606pub enum MavTunnelPayloadType {
3607    #[doc = "Encoding of payload unknown."]
3608    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3609    #[doc = "Registered for STorM32 gimbal controller."]
3610    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3611    #[doc = "Registered for STorM32 gimbal controller."]
3612    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3613    #[doc = "Registered for STorM32 gimbal controller."]
3614    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3615    #[doc = "Registered for STorM32 gimbal controller."]
3616    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3617    #[doc = "Registered for STorM32 gimbal controller."]
3618    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3619    #[doc = "Registered for STorM32 gimbal controller."]
3620    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3621    #[doc = "Registered for STorM32 gimbal controller."]
3622    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3623    #[doc = "Registered for STorM32 gimbal controller."]
3624    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3625    #[doc = "Registered for STorM32 gimbal controller."]
3626    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3627    #[doc = "Registered for STorM32 gimbal controller."]
3628    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3629    #[doc = "Registered for ModalAI remote OSD protocol."]
3630    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3631    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3632    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3633    #[doc = "Registered for ModalAI vendor use."]
3634    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3635}
3636impl MavTunnelPayloadType {
3637    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3638}
3639impl Default for MavTunnelPayloadType {
3640    fn default() -> Self {
3641        Self::DEFAULT
3642    }
3643}
3644#[cfg_attr(feature = "ts", derive(TS))]
3645#[cfg_attr(feature = "ts", ts(export))]
3646#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3648#[cfg_attr(feature = "serde", serde(tag = "type"))]
3649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3650#[repr(u32)]
3651#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3652pub enum MavType {
3653    #[doc = "Generic micro air vehicle"]
3654    MAV_TYPE_GENERIC = 0,
3655    #[doc = "Fixed wing aircraft."]
3656    MAV_TYPE_FIXED_WING = 1,
3657    #[doc = "Quadrotor"]
3658    MAV_TYPE_QUADROTOR = 2,
3659    #[doc = "Coaxial helicopter"]
3660    MAV_TYPE_COAXIAL = 3,
3661    #[doc = "Normal helicopter with tail rotor."]
3662    MAV_TYPE_HELICOPTER = 4,
3663    #[doc = "Ground installation"]
3664    MAV_TYPE_ANTENNA_TRACKER = 5,
3665    #[doc = "Operator control unit / ground control station"]
3666    MAV_TYPE_GCS = 6,
3667    #[doc = "Airship, controlled"]
3668    MAV_TYPE_AIRSHIP = 7,
3669    #[doc = "Free balloon, uncontrolled"]
3670    MAV_TYPE_FREE_BALLOON = 8,
3671    #[doc = "Rocket"]
3672    MAV_TYPE_ROCKET = 9,
3673    #[doc = "Ground rover"]
3674    MAV_TYPE_GROUND_ROVER = 10,
3675    #[doc = "Surface vessel, boat, ship"]
3676    MAV_TYPE_SURFACE_BOAT = 11,
3677    #[doc = "Submarine"]
3678    MAV_TYPE_SUBMARINE = 12,
3679    #[doc = "Hexarotor"]
3680    MAV_TYPE_HEXAROTOR = 13,
3681    #[doc = "Octorotor"]
3682    MAV_TYPE_OCTOROTOR = 14,
3683    #[doc = "Tricopter"]
3684    MAV_TYPE_TRICOPTER = 15,
3685    #[doc = "Flapping wing"]
3686    MAV_TYPE_FLAPPING_WING = 16,
3687    #[doc = "Kite"]
3688    MAV_TYPE_KITE = 17,
3689    #[doc = "Onboard companion controller"]
3690    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3691    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3692    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3693    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3694    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3695    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3696    MAV_TYPE_VTOL_TILTROTOR = 21,
3697    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3698    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3699    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3700    MAV_TYPE_VTOL_TAILSITTER = 23,
3701    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3702    MAV_TYPE_VTOL_TILTWING = 24,
3703    #[doc = "VTOL reserved 5"]
3704    MAV_TYPE_VTOL_RESERVED5 = 25,
3705    #[doc = "Gimbal"]
3706    MAV_TYPE_GIMBAL = 26,
3707    #[doc = "ADSB system"]
3708    MAV_TYPE_ADSB = 27,
3709    #[doc = "Steerable, nonrigid airfoil"]
3710    MAV_TYPE_PARAFOIL = 28,
3711    #[doc = "Dodecarotor"]
3712    MAV_TYPE_DODECAROTOR = 29,
3713    #[doc = "Camera"]
3714    MAV_TYPE_CAMERA = 30,
3715    #[doc = "Charging station"]
3716    MAV_TYPE_CHARGING_STATION = 31,
3717    #[doc = "FLARM collision avoidance system"]
3718    MAV_TYPE_FLARM = 32,
3719    #[doc = "Servo"]
3720    MAV_TYPE_SERVO = 33,
3721    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3722    MAV_TYPE_ODID = 34,
3723    #[doc = "Decarotor"]
3724    MAV_TYPE_DECAROTOR = 35,
3725    #[doc = "Battery"]
3726    MAV_TYPE_BATTERY = 36,
3727    #[doc = "Parachute"]
3728    MAV_TYPE_PARACHUTE = 37,
3729    #[doc = "Log"]
3730    MAV_TYPE_LOG = 38,
3731    #[doc = "OSD"]
3732    MAV_TYPE_OSD = 39,
3733    #[doc = "IMU"]
3734    MAV_TYPE_IMU = 40,
3735    #[doc = "GPS"]
3736    MAV_TYPE_GPS = 41,
3737    #[doc = "Winch"]
3738    MAV_TYPE_WINCH = 42,
3739    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3740    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3741    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3742    MAV_TYPE_ILLUMINATOR = 44,
3743    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3744    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3745}
3746impl MavType {
3747    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3748}
3749impl Default for MavType {
3750    fn default() -> Self {
3751        Self::DEFAULT
3752    }
3753}
3754#[cfg_attr(feature = "ts", derive(TS))]
3755#[cfg_attr(feature = "ts", ts(export))]
3756#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3758#[cfg_attr(feature = "serde", serde(tag = "type"))]
3759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3760#[repr(u32)]
3761#[doc = "Enumeration of VTOL states"]
3762pub enum MavVtolState {
3763    #[doc = "MAV is not configured as VTOL"]
3764    MAV_VTOL_STATE_UNDEFINED = 0,
3765    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3766    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3767    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3768    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3769    #[doc = "VTOL is in multicopter state"]
3770    MAV_VTOL_STATE_MC = 3,
3771    #[doc = "VTOL is in fixed-wing state"]
3772    MAV_VTOL_STATE_FW = 4,
3773}
3774impl MavVtolState {
3775    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3776}
3777impl Default for MavVtolState {
3778    fn default() -> Self {
3779        Self::DEFAULT
3780    }
3781}
3782bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3783impl MavWinchStatusFlag {
3784    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3785}
3786impl Default for MavWinchStatusFlag {
3787    fn default() -> Self {
3788        Self::DEFAULT
3789    }
3790}
3791#[cfg_attr(feature = "ts", derive(TS))]
3792#[cfg_attr(feature = "ts", ts(export))]
3793#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3795#[cfg_attr(feature = "serde", serde(tag = "type"))]
3796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3797#[repr(u32)]
3798pub enum MavlinkDataStreamType {
3799    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3800    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3801    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3802    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3803    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3804    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3805}
3806impl MavlinkDataStreamType {
3807    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3808}
3809impl Default for MavlinkDataStreamType {
3810    fn default() -> Self {
3811        Self::DEFAULT
3812    }
3813}
3814#[cfg_attr(feature = "ts", derive(TS))]
3815#[cfg_attr(feature = "ts", ts(export))]
3816#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3818#[cfg_attr(feature = "serde", serde(tag = "type"))]
3819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3820#[repr(u32)]
3821#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3822pub enum MissionState {
3823    #[doc = "The mission status reporting is not supported."]
3824    MISSION_STATE_UNKNOWN = 0,
3825    #[doc = "No mission on the vehicle."]
3826    MISSION_STATE_NO_MISSION = 1,
3827    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3828    MISSION_STATE_NOT_STARTED = 2,
3829    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3830    MISSION_STATE_ACTIVE = 3,
3831    #[doc = "Mission is paused when in auto mode."]
3832    MISSION_STATE_PAUSED = 4,
3833    #[doc = "Mission has executed all mission items."]
3834    MISSION_STATE_COMPLETE = 5,
3835}
3836impl MissionState {
3837    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3838}
3839impl Default for MissionState {
3840    fn default() -> Self {
3841        Self::DEFAULT
3842    }
3843}
3844#[cfg_attr(feature = "ts", derive(TS))]
3845#[cfg_attr(feature = "ts", ts(export))]
3846#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3848#[cfg_attr(feature = "serde", serde(tag = "type"))]
3849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3850#[repr(u32)]
3851#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3852pub enum MotorTestOrder {
3853    #[doc = "Default autopilot motor test method."]
3854    MOTOR_TEST_ORDER_DEFAULT = 0,
3855    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3856    MOTOR_TEST_ORDER_SEQUENCE = 1,
3857    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3858    MOTOR_TEST_ORDER_BOARD = 2,
3859}
3860impl MotorTestOrder {
3861    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3862}
3863impl Default for MotorTestOrder {
3864    fn default() -> Self {
3865        Self::DEFAULT
3866    }
3867}
3868#[cfg_attr(feature = "ts", derive(TS))]
3869#[cfg_attr(feature = "ts", ts(export))]
3870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3872#[cfg_attr(feature = "serde", serde(tag = "type"))]
3873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3874#[repr(u32)]
3875#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3876pub enum MotorTestThrottleType {
3877    #[doc = "Throttle as a percentage (0 ~ 100)"]
3878    MOTOR_TEST_THROTTLE_PERCENT = 0,
3879    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3880    MOTOR_TEST_THROTTLE_PWM = 1,
3881    #[doc = "Throttle pass-through from pilot's transmitter."]
3882    MOTOR_TEST_THROTTLE_PILOT = 2,
3883    #[doc = "Per-motor compass calibration test."]
3884    MOTOR_TEST_COMPASS_CAL = 3,
3885}
3886impl MotorTestThrottleType {
3887    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3888}
3889impl Default for MotorTestThrottleType {
3890    fn default() -> Self {
3891        Self::DEFAULT
3892    }
3893}
3894#[cfg_attr(feature = "ts", derive(TS))]
3895#[cfg_attr(feature = "ts", ts(export))]
3896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3898#[cfg_attr(feature = "serde", serde(tag = "type"))]
3899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3900#[repr(u32)]
3901pub enum NavVtolLandOptions {
3902    #[doc = "Default autopilot landing behaviour."]
3903    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3904    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3905    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3906    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3907    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3908}
3909impl NavVtolLandOptions {
3910    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3911}
3912impl Default for NavVtolLandOptions {
3913    fn default() -> Self {
3914        Self::DEFAULT
3915    }
3916}
3917#[cfg_attr(feature = "ts", derive(TS))]
3918#[cfg_attr(feature = "ts", ts(export))]
3919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3921#[cfg_attr(feature = "serde", serde(tag = "type"))]
3922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3923#[repr(u32)]
3924#[doc = "Yaw behaviour during orbit flight."]
3925pub enum OrbitYawBehaviour {
3926    #[doc = "Vehicle front points to the center (default)."]
3927    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3928    #[doc = "Vehicle front holds heading when message received."]
3929    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3930    #[doc = "Yaw uncontrolled."]
3931    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3932    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3933    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3934    #[doc = "Yaw controlled by RC input."]
3935    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3936    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3937    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3938}
3939impl OrbitYawBehaviour {
3940    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3941}
3942impl Default for OrbitYawBehaviour {
3943    fn default() -> Self {
3944        Self::DEFAULT
3945    }
3946}
3947#[cfg_attr(feature = "ts", derive(TS))]
3948#[cfg_attr(feature = "ts", ts(export))]
3949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3951#[cfg_attr(feature = "serde", serde(tag = "type"))]
3952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3953#[repr(u32)]
3954#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3955pub enum ParachuteAction {
3956    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3957    PARACHUTE_DISABLE = 0,
3958    #[doc = "Enable auto-release of parachute."]
3959    PARACHUTE_ENABLE = 1,
3960    #[doc = "Release parachute and kill motors."]
3961    PARACHUTE_RELEASE = 2,
3962}
3963impl ParachuteAction {
3964    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3965}
3966impl Default for ParachuteAction {
3967    fn default() -> Self {
3968        Self::DEFAULT
3969    }
3970}
3971#[cfg_attr(feature = "ts", derive(TS))]
3972#[cfg_attr(feature = "ts", ts(export))]
3973#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3975#[cfg_attr(feature = "serde", serde(tag = "type"))]
3976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3977#[repr(u32)]
3978#[doc = "Result from PARAM_EXT_SET message."]
3979pub enum ParamAck {
3980    #[doc = "Parameter value ACCEPTED and SET"]
3981    PARAM_ACK_ACCEPTED = 0,
3982    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3983    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3984    #[doc = "Parameter failed to set"]
3985    PARAM_ACK_FAILED = 2,
3986    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3987    PARAM_ACK_IN_PROGRESS = 3,
3988}
3989impl ParamAck {
3990    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3991}
3992impl Default for ParamAck {
3993    fn default() -> Self {
3994        Self::DEFAULT
3995    }
3996}
3997bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3998impl PositionTargetTypemask {
3999    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4000}
4001impl Default for PositionTargetTypemask {
4002    fn default() -> Self {
4003        Self::DEFAULT
4004    }
4005}
4006#[cfg_attr(feature = "ts", derive(TS))]
4007#[cfg_attr(feature = "ts", ts(export))]
4008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4010#[cfg_attr(feature = "serde", serde(tag = "type"))]
4011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4012#[repr(u32)]
4013#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4014pub enum PrecisionLandMode {
4015    #[doc = "Normal (non-precision) landing."]
4016    PRECISION_LAND_MODE_DISABLED = 0,
4017    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4018    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4019    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4020    PRECISION_LAND_MODE_REQUIRED = 2,
4021}
4022impl PrecisionLandMode {
4023    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4024}
4025impl Default for PrecisionLandMode {
4026    fn default() -> Self {
4027        Self::DEFAULT
4028    }
4029}
4030#[cfg_attr(feature = "ts", derive(TS))]
4031#[cfg_attr(feature = "ts", ts(export))]
4032#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4034#[cfg_attr(feature = "serde", serde(tag = "type"))]
4035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4036#[repr(u32)]
4037#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4038pub enum PreflightStorageMissionAction {
4039    #[doc = "Read current mission data from persistent storage"]
4040    MISSION_READ_PERSISTENT = 0,
4041    #[doc = "Write current mission data to persistent storage"]
4042    MISSION_WRITE_PERSISTENT = 1,
4043    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4044    MISSION_RESET_DEFAULT = 2,
4045}
4046impl PreflightStorageMissionAction {
4047    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4048}
4049impl Default for PreflightStorageMissionAction {
4050    fn default() -> Self {
4051        Self::DEFAULT
4052    }
4053}
4054#[cfg_attr(feature = "ts", derive(TS))]
4055#[cfg_attr(feature = "ts", ts(export))]
4056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4058#[cfg_attr(feature = "serde", serde(tag = "type"))]
4059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4060#[repr(u32)]
4061#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4062pub enum PreflightStorageParameterAction {
4063    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4064    PARAM_READ_PERSISTENT = 0,
4065    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4066    PARAM_WRITE_PERSISTENT = 1,
4067    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4068    PARAM_RESET_CONFIG_DEFAULT = 2,
4069    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4070    PARAM_RESET_SENSOR_DEFAULT = 3,
4071    #[doc = "Reset all parameters, including operation counters, to default values"]
4072    PARAM_RESET_ALL_DEFAULT = 4,
4073}
4074impl PreflightStorageParameterAction {
4075    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4076}
4077impl Default for PreflightStorageParameterAction {
4078    fn default() -> Self {
4079        Self::DEFAULT
4080    }
4081}
4082#[cfg_attr(feature = "ts", derive(TS))]
4083#[cfg_attr(feature = "ts", ts(export))]
4084#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4086#[cfg_attr(feature = "serde", serde(tag = "type"))]
4087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4088#[repr(u32)]
4089#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4090pub enum RcSubType {
4091    #[doc = "Spektrum DSM2"]
4092    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4093    #[doc = "Spektrum DSMX"]
4094    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4095    #[doc = "Spektrum DSMX8"]
4096    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4097}
4098impl RcSubType {
4099    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4100}
4101impl Default for RcSubType {
4102    fn default() -> Self {
4103        Self::DEFAULT
4104    }
4105}
4106#[cfg_attr(feature = "ts", derive(TS))]
4107#[cfg_attr(feature = "ts", ts(export))]
4108#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4110#[cfg_attr(feature = "serde", serde(tag = "type"))]
4111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4112#[repr(u32)]
4113#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4114pub enum RcType {
4115    #[doc = "Spektrum"]
4116    RC_TYPE_SPEKTRUM = 0,
4117    #[doc = "CRSF"]
4118    RC_TYPE_CRSF = 1,
4119}
4120impl RcType {
4121    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4122}
4123impl Default for RcType {
4124    fn default() -> Self {
4125        Self::DEFAULT
4126    }
4127}
4128#[cfg_attr(feature = "ts", derive(TS))]
4129#[cfg_attr(feature = "ts", ts(export))]
4130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4132#[cfg_attr(feature = "serde", serde(tag = "type"))]
4133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4134#[repr(u32)]
4135#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4136pub enum RebootShutdownConditions {
4137    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4138    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4139    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4140    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4141}
4142impl RebootShutdownConditions {
4143    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4144}
4145impl Default for RebootShutdownConditions {
4146    fn default() -> Self {
4147        Self::DEFAULT
4148    }
4149}
4150#[cfg_attr(feature = "ts", derive(TS))]
4151#[cfg_attr(feature = "ts", ts(export))]
4152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4154#[cfg_attr(feature = "serde", serde(tag = "type"))]
4155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4156#[repr(u32)]
4157#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4158pub enum RtkBaselineCoordinateSystem {
4159    #[doc = "Earth-centered, Earth-fixed"]
4160    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4161    #[doc = "RTK basestation centered, north, east, down"]
4162    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4163}
4164impl RtkBaselineCoordinateSystem {
4165    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4166}
4167impl Default for RtkBaselineCoordinateSystem {
4168    fn default() -> Self {
4169        Self::DEFAULT
4170    }
4171}
4172#[cfg_attr(feature = "ts", derive(TS))]
4173#[cfg_attr(feature = "ts", ts(export))]
4174#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4176#[cfg_attr(feature = "serde", serde(tag = "type"))]
4177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4178#[repr(u32)]
4179#[doc = "Possible safety switch states."]
4180pub enum SafetySwitchState {
4181    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4182    SAFETY_SWITCH_STATE_SAFE = 0,
4183    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4184    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4185}
4186impl SafetySwitchState {
4187    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4188}
4189impl Default for SafetySwitchState {
4190    fn default() -> Self {
4191        Self::DEFAULT
4192    }
4193}
4194#[cfg_attr(feature = "ts", derive(TS))]
4195#[cfg_attr(feature = "ts", ts(export))]
4196#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4198#[cfg_attr(feature = "serde", serde(tag = "type"))]
4199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4200#[repr(u32)]
4201#[doc = "SERIAL_CONTROL device types"]
4202pub enum SerialControlDev {
4203    #[doc = "First telemetry port"]
4204    SERIAL_CONTROL_DEV_TELEM1 = 0,
4205    #[doc = "Second telemetry port"]
4206    SERIAL_CONTROL_DEV_TELEM2 = 1,
4207    #[doc = "First GPS port"]
4208    SERIAL_CONTROL_DEV_GPS1 = 2,
4209    #[doc = "Second GPS port"]
4210    SERIAL_CONTROL_DEV_GPS2 = 3,
4211    #[doc = "system shell"]
4212    SERIAL_CONTROL_DEV_SHELL = 10,
4213    #[doc = "SERIAL0"]
4214    SERIAL_CONTROL_SERIAL0 = 100,
4215    #[doc = "SERIAL1"]
4216    SERIAL_CONTROL_SERIAL1 = 101,
4217    #[doc = "SERIAL2"]
4218    SERIAL_CONTROL_SERIAL2 = 102,
4219    #[doc = "SERIAL3"]
4220    SERIAL_CONTROL_SERIAL3 = 103,
4221    #[doc = "SERIAL4"]
4222    SERIAL_CONTROL_SERIAL4 = 104,
4223    #[doc = "SERIAL5"]
4224    SERIAL_CONTROL_SERIAL5 = 105,
4225    #[doc = "SERIAL6"]
4226    SERIAL_CONTROL_SERIAL6 = 106,
4227    #[doc = "SERIAL7"]
4228    SERIAL_CONTROL_SERIAL7 = 107,
4229    #[doc = "SERIAL8"]
4230    SERIAL_CONTROL_SERIAL8 = 108,
4231    #[doc = "SERIAL9"]
4232    SERIAL_CONTROL_SERIAL9 = 109,
4233}
4234impl SerialControlDev {
4235    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4236}
4237impl Default for SerialControlDev {
4238    fn default() -> Self {
4239        Self::DEFAULT
4240    }
4241}
4242bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4243impl SerialControlFlag {
4244    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4245}
4246impl Default for SerialControlFlag {
4247    fn default() -> Self {
4248        Self::DEFAULT
4249    }
4250}
4251#[cfg_attr(feature = "ts", derive(TS))]
4252#[cfg_attr(feature = "ts", ts(export))]
4253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4255#[cfg_attr(feature = "serde", serde(tag = "type"))]
4256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4257#[repr(u32)]
4258#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4259pub enum SetFocusType {
4260    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4261    FOCUS_TYPE_STEP = 0,
4262    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4263    FOCUS_TYPE_CONTINUOUS = 1,
4264    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4265    FOCUS_TYPE_RANGE = 2,
4266    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4267    FOCUS_TYPE_METERS = 3,
4268    #[doc = "Focus automatically."]
4269    FOCUS_TYPE_AUTO = 4,
4270    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4271    FOCUS_TYPE_AUTO_SINGLE = 5,
4272    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4273    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4274}
4275impl SetFocusType {
4276    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4277}
4278impl Default for SetFocusType {
4279    fn default() -> Self {
4280        Self::DEFAULT
4281    }
4282}
4283#[cfg_attr(feature = "ts", derive(TS))]
4284#[cfg_attr(feature = "ts", ts(export))]
4285#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4287#[cfg_attr(feature = "serde", serde(tag = "type"))]
4288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4289#[repr(u32)]
4290#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4291pub enum SpeedType {
4292    #[doc = "Airspeed"]
4293    SPEED_TYPE_AIRSPEED = 0,
4294    #[doc = "Groundspeed"]
4295    SPEED_TYPE_GROUNDSPEED = 1,
4296    #[doc = "Climb speed"]
4297    SPEED_TYPE_CLIMB_SPEED = 2,
4298    #[doc = "Descent speed"]
4299    SPEED_TYPE_DESCENT_SPEED = 3,
4300}
4301impl SpeedType {
4302    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4303}
4304impl Default for SpeedType {
4305    fn default() -> Self {
4306        Self::DEFAULT
4307    }
4308}
4309#[cfg_attr(feature = "ts", derive(TS))]
4310#[cfg_attr(feature = "ts", ts(export))]
4311#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4313#[cfg_attr(feature = "serde", serde(tag = "type"))]
4314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4315#[repr(u32)]
4316#[doc = "Flags to indicate the status of camera storage."]
4317pub enum StorageStatus {
4318    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4319    STORAGE_STATUS_EMPTY = 0,
4320    #[doc = "Storage present but unformatted."]
4321    STORAGE_STATUS_UNFORMATTED = 1,
4322    #[doc = "Storage present and ready."]
4323    STORAGE_STATUS_READY = 2,
4324    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4325    STORAGE_STATUS_NOT_SUPPORTED = 3,
4326}
4327impl StorageStatus {
4328    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4329}
4330impl Default for StorageStatus {
4331    fn default() -> Self {
4332        Self::DEFAULT
4333    }
4334}
4335#[cfg_attr(feature = "ts", derive(TS))]
4336#[cfg_attr(feature = "ts", ts(export))]
4337#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4339#[cfg_attr(feature = "serde", serde(tag = "type"))]
4340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4341#[repr(u32)]
4342#[doc = "Flags to indicate the type of storage."]
4343pub enum StorageType {
4344    #[doc = "Storage type is not known."]
4345    STORAGE_TYPE_UNKNOWN = 0,
4346    #[doc = "Storage type is USB device."]
4347    STORAGE_TYPE_USB_STICK = 1,
4348    #[doc = "Storage type is SD card."]
4349    STORAGE_TYPE_SD = 2,
4350    #[doc = "Storage type is microSD card."]
4351    STORAGE_TYPE_MICROSD = 3,
4352    #[doc = "Storage type is CFast."]
4353    STORAGE_TYPE_CF = 4,
4354    #[doc = "Storage type is CFexpress."]
4355    STORAGE_TYPE_CFE = 5,
4356    #[doc = "Storage type is XQD."]
4357    STORAGE_TYPE_XQD = 6,
4358    #[doc = "Storage type is HD mass storage type."]
4359    STORAGE_TYPE_HD = 7,
4360    #[doc = "Storage type is other, not listed type."]
4361    STORAGE_TYPE_OTHER = 254,
4362}
4363impl StorageType {
4364    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4365}
4366impl Default for StorageType {
4367    fn default() -> Self {
4368        Self::DEFAULT
4369    }
4370}
4371bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4372impl StorageUsageFlag {
4373    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4374}
4375impl Default for StorageUsageFlag {
4376    fn default() -> Self {
4377        Self::DEFAULT
4378    }
4379}
4380#[cfg_attr(feature = "ts", derive(TS))]
4381#[cfg_attr(feature = "ts", ts(export))]
4382#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4384#[cfg_attr(feature = "serde", serde(tag = "type"))]
4385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4386#[repr(u32)]
4387#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4388pub enum TuneFormat {
4389    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4390    TUNE_FORMAT_QBASIC1_1 = 1,
4391    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4392    TUNE_FORMAT_MML_MODERN = 2,
4393}
4394impl TuneFormat {
4395    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4396}
4397impl Default for TuneFormat {
4398    fn default() -> Self {
4399        Self::DEFAULT
4400    }
4401}
4402#[cfg_attr(feature = "ts", derive(TS))]
4403#[cfg_attr(feature = "ts", ts(export))]
4404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4406#[cfg_attr(feature = "serde", serde(tag = "type"))]
4407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4408#[repr(u32)]
4409#[doc = "Generalized UAVCAN node health"]
4410pub enum UavcanNodeHealth {
4411    #[doc = "The node is functioning properly."]
4412    UAVCAN_NODE_HEALTH_OK = 0,
4413    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4414    UAVCAN_NODE_HEALTH_WARNING = 1,
4415    #[doc = "The node has encountered a major failure."]
4416    UAVCAN_NODE_HEALTH_ERROR = 2,
4417    #[doc = "The node has suffered a fatal malfunction."]
4418    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4419}
4420impl UavcanNodeHealth {
4421    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4422}
4423impl Default for UavcanNodeHealth {
4424    fn default() -> Self {
4425        Self::DEFAULT
4426    }
4427}
4428#[cfg_attr(feature = "ts", derive(TS))]
4429#[cfg_attr(feature = "ts", ts(export))]
4430#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4432#[cfg_attr(feature = "serde", serde(tag = "type"))]
4433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4434#[repr(u32)]
4435#[doc = "Generalized UAVCAN node mode"]
4436pub enum UavcanNodeMode {
4437    #[doc = "The node is performing its primary functions."]
4438    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4439    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4440    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4441    #[doc = "The node is under maintenance."]
4442    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4443    #[doc = "The node is in the process of updating its software."]
4444    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4445    #[doc = "The node is no longer available online."]
4446    UAVCAN_NODE_MODE_OFFLINE = 7,
4447}
4448impl UavcanNodeMode {
4449    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4450}
4451impl Default for UavcanNodeMode {
4452    fn default() -> Self {
4453        Self::DEFAULT
4454    }
4455}
4456bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4457impl UtmDataAvailFlags {
4458    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4459}
4460impl Default for UtmDataAvailFlags {
4461    fn default() -> Self {
4462        Self::DEFAULT
4463    }
4464}
4465#[cfg_attr(feature = "ts", derive(TS))]
4466#[cfg_attr(feature = "ts", ts(export))]
4467#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4469#[cfg_attr(feature = "serde", serde(tag = "type"))]
4470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4471#[repr(u32)]
4472#[doc = "Airborne status of UAS."]
4473pub enum UtmFlightState {
4474    #[doc = "The flight state can't be determined."]
4475    UTM_FLIGHT_STATE_UNKNOWN = 1,
4476    #[doc = "UAS on ground."]
4477    UTM_FLIGHT_STATE_GROUND = 2,
4478    #[doc = "UAS airborne."]
4479    UTM_FLIGHT_STATE_AIRBORNE = 3,
4480    #[doc = "UAS is in an emergency flight state."]
4481    UTM_FLIGHT_STATE_EMERGENCY = 16,
4482    #[doc = "UAS has no active controls."]
4483    UTM_FLIGHT_STATE_NOCTRL = 32,
4484}
4485impl UtmFlightState {
4486    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4487}
4488impl Default for UtmFlightState {
4489    fn default() -> Self {
4490        Self::DEFAULT
4491    }
4492}
4493#[cfg_attr(feature = "ts", derive(TS))]
4494#[cfg_attr(feature = "ts", ts(export))]
4495#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4497#[cfg_attr(feature = "serde", serde(tag = "type"))]
4498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4499#[repr(u32)]
4500#[doc = "Video stream encodings"]
4501pub enum VideoStreamEncoding {
4502    #[doc = "Stream encoding is unknown"]
4503    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4504    #[doc = "Stream encoding is H.264"]
4505    VIDEO_STREAM_ENCODING_H264 = 1,
4506    #[doc = "Stream encoding is H.265"]
4507    VIDEO_STREAM_ENCODING_H265 = 2,
4508}
4509impl VideoStreamEncoding {
4510    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4511}
4512impl Default for VideoStreamEncoding {
4513    fn default() -> Self {
4514        Self::DEFAULT
4515    }
4516}
4517bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4518impl VideoStreamStatusFlags {
4519    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4520}
4521impl Default for VideoStreamStatusFlags {
4522    fn default() -> Self {
4523        Self::DEFAULT
4524    }
4525}
4526#[cfg_attr(feature = "ts", derive(TS))]
4527#[cfg_attr(feature = "ts", ts(export))]
4528#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4530#[cfg_attr(feature = "serde", serde(tag = "type"))]
4531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4532#[repr(u32)]
4533#[doc = "Video stream types"]
4534pub enum VideoStreamType {
4535    #[doc = "Stream is RTSP"]
4536    VIDEO_STREAM_TYPE_RTSP = 0,
4537    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4538    VIDEO_STREAM_TYPE_RTPUDP = 1,
4539    #[doc = "Stream is MPEG on TCP"]
4540    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4541    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4542    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4543}
4544impl VideoStreamType {
4545    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4546}
4547impl Default for VideoStreamType {
4548    fn default() -> Self {
4549        Self::DEFAULT
4550    }
4551}
4552#[cfg_attr(feature = "ts", derive(TS))]
4553#[cfg_attr(feature = "ts", ts(export))]
4554#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4556#[cfg_attr(feature = "serde", serde(tag = "type"))]
4557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4558#[repr(u32)]
4559#[doc = "Direction of VTOL transition"]
4560pub enum VtolTransitionHeading {
4561    #[doc = "Respect the heading configuration of the vehicle."]
4562    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4563    #[doc = "Use the heading pointing towards the next waypoint."]
4564    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4565    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4566    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4567    #[doc = "Use the specified heading in parameter 4."]
4568    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4569    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4570    VTOL_TRANSITION_HEADING_ANY = 4,
4571}
4572impl VtolTransitionHeading {
4573    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4574}
4575impl Default for VtolTransitionHeading {
4576    fn default() -> Self {
4577        Self::DEFAULT
4578    }
4579}
4580#[cfg_attr(feature = "ts", derive(TS))]
4581#[cfg_attr(feature = "ts", ts(export))]
4582#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4584#[cfg_attr(feature = "serde", serde(tag = "type"))]
4585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4586#[repr(u32)]
4587#[doc = "WiFi Mode."]
4588pub enum WifiConfigApMode {
4589    #[doc = "WiFi mode is undefined."]
4590    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4591    #[doc = "WiFi configured as an access point."]
4592    WIFI_CONFIG_AP_MODE_AP = 1,
4593    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4594    WIFI_CONFIG_AP_MODE_STATION = 2,
4595    #[doc = "WiFi disabled."]
4596    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4597}
4598impl WifiConfigApMode {
4599    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4600}
4601impl Default for WifiConfigApMode {
4602    fn default() -> Self {
4603        Self::DEFAULT
4604    }
4605}
4606#[cfg_attr(feature = "ts", derive(TS))]
4607#[cfg_attr(feature = "ts", ts(export))]
4608#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4610#[cfg_attr(feature = "serde", serde(tag = "type"))]
4611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4612#[repr(u32)]
4613#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4614pub enum WifiConfigApResponse {
4615    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4616    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4617    #[doc = "Changes accepted."]
4618    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4619    #[doc = "Changes rejected."]
4620    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4621    #[doc = "Invalid Mode."]
4622    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4623    #[doc = "Invalid SSID."]
4624    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4625    #[doc = "Invalid Password."]
4626    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4627}
4628impl WifiConfigApResponse {
4629    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4630}
4631impl Default for WifiConfigApResponse {
4632    fn default() -> Self {
4633        Self::DEFAULT
4634    }
4635}
4636#[cfg_attr(feature = "ts", derive(TS))]
4637#[cfg_attr(feature = "ts", ts(export))]
4638#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4640#[cfg_attr(feature = "serde", serde(tag = "type"))]
4641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4642#[repr(u32)]
4643#[doc = "Winch actions."]
4644pub enum WinchActions {
4645    #[doc = "Allow motor to freewheel."]
4646    WINCH_RELAXED = 0,
4647    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4648    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4649    #[doc = "Wind or unwind line at specified rate."]
4650    WINCH_RATE_CONTROL = 2,
4651    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4652    WINCH_LOCK = 3,
4653    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4654    WINCH_DELIVER = 4,
4655    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4656    WINCH_HOLD = 5,
4657    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4658    WINCH_RETRACT = 6,
4659    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4660    WINCH_LOAD_LINE = 7,
4661    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4662    WINCH_ABANDON_LINE = 8,
4663    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4664    WINCH_LOAD_PAYLOAD = 9,
4665}
4666impl WinchActions {
4667    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4668}
4669impl Default for WinchActions {
4670    fn default() -> Self {
4671        Self::DEFAULT
4672    }
4673}
4674#[doc = "Set the vehicle attitude and body angular rates."]
4675#[doc = ""]
4676#[doc = "ID: 140"]
4677#[derive(Debug, Clone, PartialEq)]
4678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4680#[cfg_attr(feature = "ts", derive(TS))]
4681#[cfg_attr(feature = "ts", ts(export))]
4682pub struct ACTUATOR_CONTROL_TARGET_DATA {
4683    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4684    pub time_usec: u64,
4685    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4687    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4688    pub controls: [f32; 8],
4689    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4690    pub group_mlx: u8,
4691}
4692impl ACTUATOR_CONTROL_TARGET_DATA {
4693    pub const ENCODED_LEN: usize = 41usize;
4694    pub const DEFAULT: Self = Self {
4695        time_usec: 0_u64,
4696        controls: [0.0_f32; 8usize],
4697        group_mlx: 0_u8,
4698    };
4699    #[cfg(feature = "arbitrary")]
4700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4701        use arbitrary::{Arbitrary, Unstructured};
4702        let mut buf = [0u8; 1024];
4703        rng.fill_bytes(&mut buf);
4704        let mut unstructured = Unstructured::new(&buf);
4705        Self::arbitrary(&mut unstructured).unwrap_or_default()
4706    }
4707}
4708impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4709    fn default() -> Self {
4710        Self::DEFAULT.clone()
4711    }
4712}
4713impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4714    type Message = MavMessage;
4715    const ID: u32 = 140u32;
4716    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4717    const EXTRA_CRC: u8 = 181u8;
4718    const ENCODED_LEN: usize = 41usize;
4719    fn deser(
4720        _version: MavlinkVersion,
4721        __input: &[u8],
4722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4723        let avail_len = __input.len();
4724        let mut payload_buf = [0; Self::ENCODED_LEN];
4725        let mut buf = if avail_len < Self::ENCODED_LEN {
4726            payload_buf[0..avail_len].copy_from_slice(__input);
4727            Bytes::new(&payload_buf)
4728        } else {
4729            Bytes::new(__input)
4730        };
4731        let mut __struct = Self::default();
4732        __struct.time_usec = buf.get_u64_le();
4733        for v in &mut __struct.controls {
4734            let val = buf.get_f32_le();
4735            *v = val;
4736        }
4737        __struct.group_mlx = buf.get_u8();
4738        Ok(__struct)
4739    }
4740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4741        let mut __tmp = BytesMut::new(bytes);
4742        #[allow(clippy::absurd_extreme_comparisons)]
4743        #[allow(unused_comparisons)]
4744        if __tmp.remaining() < Self::ENCODED_LEN {
4745            panic!(
4746                "buffer is too small (need {} bytes, but got {})",
4747                Self::ENCODED_LEN,
4748                __tmp.remaining(),
4749            )
4750        }
4751        __tmp.put_u64_le(self.time_usec);
4752        for val in &self.controls {
4753            __tmp.put_f32_le(*val);
4754        }
4755        __tmp.put_u8(self.group_mlx);
4756        if matches!(version, MavlinkVersion::V2) {
4757            let len = __tmp.len();
4758            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4759        } else {
4760            __tmp.len()
4761        }
4762    }
4763}
4764#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4765#[doc = ""]
4766#[doc = "ID: 375"]
4767#[derive(Debug, Clone, PartialEq)]
4768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4770#[cfg_attr(feature = "ts", derive(TS))]
4771#[cfg_attr(feature = "ts", ts(export))]
4772pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4773    #[doc = "Timestamp (since system boot)."]
4774    pub time_usec: u64,
4775    #[doc = "Active outputs"]
4776    pub active: u32,
4777    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4779    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4780    pub actuator: [f32; 32],
4781}
4782impl ACTUATOR_OUTPUT_STATUS_DATA {
4783    pub const ENCODED_LEN: usize = 140usize;
4784    pub const DEFAULT: Self = Self {
4785        time_usec: 0_u64,
4786        active: 0_u32,
4787        actuator: [0.0_f32; 32usize],
4788    };
4789    #[cfg(feature = "arbitrary")]
4790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4791        use arbitrary::{Arbitrary, Unstructured};
4792        let mut buf = [0u8; 1024];
4793        rng.fill_bytes(&mut buf);
4794        let mut unstructured = Unstructured::new(&buf);
4795        Self::arbitrary(&mut unstructured).unwrap_or_default()
4796    }
4797}
4798impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4799    fn default() -> Self {
4800        Self::DEFAULT.clone()
4801    }
4802}
4803impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4804    type Message = MavMessage;
4805    const ID: u32 = 375u32;
4806    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4807    const EXTRA_CRC: u8 = 251u8;
4808    const ENCODED_LEN: usize = 140usize;
4809    fn deser(
4810        _version: MavlinkVersion,
4811        __input: &[u8],
4812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4813        let avail_len = __input.len();
4814        let mut payload_buf = [0; Self::ENCODED_LEN];
4815        let mut buf = if avail_len < Self::ENCODED_LEN {
4816            payload_buf[0..avail_len].copy_from_slice(__input);
4817            Bytes::new(&payload_buf)
4818        } else {
4819            Bytes::new(__input)
4820        };
4821        let mut __struct = Self::default();
4822        __struct.time_usec = buf.get_u64_le();
4823        __struct.active = buf.get_u32_le();
4824        for v in &mut __struct.actuator {
4825            let val = buf.get_f32_le();
4826            *v = val;
4827        }
4828        Ok(__struct)
4829    }
4830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4831        let mut __tmp = BytesMut::new(bytes);
4832        #[allow(clippy::absurd_extreme_comparisons)]
4833        #[allow(unused_comparisons)]
4834        if __tmp.remaining() < Self::ENCODED_LEN {
4835            panic!(
4836                "buffer is too small (need {} bytes, but got {})",
4837                Self::ENCODED_LEN,
4838                __tmp.remaining(),
4839            )
4840        }
4841        __tmp.put_u64_le(self.time_usec);
4842        __tmp.put_u32_le(self.active);
4843        for val in &self.actuator {
4844            __tmp.put_f32_le(*val);
4845        }
4846        if matches!(version, MavlinkVersion::V2) {
4847            let len = __tmp.len();
4848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4849        } else {
4850            __tmp.len()
4851        }
4852    }
4853}
4854#[doc = "The location and information of an ADSB vehicle."]
4855#[doc = ""]
4856#[doc = "ID: 246"]
4857#[derive(Debug, Clone, PartialEq)]
4858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4860#[cfg_attr(feature = "ts", derive(TS))]
4861#[cfg_attr(feature = "ts", ts(export))]
4862pub struct ADSB_VEHICLE_DATA {
4863    #[doc = "ICAO address"]
4864    pub ICAO_address: u32,
4865    #[doc = "Latitude"]
4866    pub lat: i32,
4867    #[doc = "Longitude"]
4868    pub lon: i32,
4869    #[doc = "Altitude(ASL)"]
4870    pub altitude: i32,
4871    #[doc = "Course over ground"]
4872    pub heading: u16,
4873    #[doc = "The horizontal velocity"]
4874    pub hor_velocity: u16,
4875    #[doc = "The vertical velocity. Positive is up"]
4876    pub ver_velocity: i16,
4877    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4878    pub flags: AdsbFlags,
4879    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4880    pub squawk: u16,
4881    #[doc = "ADSB altitude type."]
4882    pub altitude_type: AdsbAltitudeType,
4883    #[doc = "The callsign, 8+null"]
4884    #[cfg_attr(
4885        feature = "serde",
4886        serde(
4887            serialize_with = "crate::nulstr::serialize::<_, 9>",
4888            deserialize_with = "crate::nulstr::deserialize::<_, 9>"
4889        )
4890    )]
4891    #[cfg_attr(feature = "ts", ts(type = "string"))]
4892    pub callsign: [u8; 9],
4893    #[doc = "ADSB emitter type."]
4894    pub emitter_type: AdsbEmitterType,
4895    #[doc = "Time since last communication in seconds"]
4896    pub tslc: u8,
4897}
4898impl ADSB_VEHICLE_DATA {
4899    pub const ENCODED_LEN: usize = 38usize;
4900    pub const DEFAULT: Self = Self {
4901        ICAO_address: 0_u32,
4902        lat: 0_i32,
4903        lon: 0_i32,
4904        altitude: 0_i32,
4905        heading: 0_u16,
4906        hor_velocity: 0_u16,
4907        ver_velocity: 0_i16,
4908        flags: AdsbFlags::DEFAULT,
4909        squawk: 0_u16,
4910        altitude_type: AdsbAltitudeType::DEFAULT,
4911        callsign: [0_u8; 9usize],
4912        emitter_type: AdsbEmitterType::DEFAULT,
4913        tslc: 0_u8,
4914    };
4915    #[cfg(feature = "arbitrary")]
4916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4917        use arbitrary::{Arbitrary, Unstructured};
4918        let mut buf = [0u8; 1024];
4919        rng.fill_bytes(&mut buf);
4920        let mut unstructured = Unstructured::new(&buf);
4921        Self::arbitrary(&mut unstructured).unwrap_or_default()
4922    }
4923}
4924impl Default for ADSB_VEHICLE_DATA {
4925    fn default() -> Self {
4926        Self::DEFAULT.clone()
4927    }
4928}
4929impl MessageData for ADSB_VEHICLE_DATA {
4930    type Message = MavMessage;
4931    const ID: u32 = 246u32;
4932    const NAME: &'static str = "ADSB_VEHICLE";
4933    const EXTRA_CRC: u8 = 184u8;
4934    const ENCODED_LEN: usize = 38usize;
4935    fn deser(
4936        _version: MavlinkVersion,
4937        __input: &[u8],
4938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4939        let avail_len = __input.len();
4940        let mut payload_buf = [0; Self::ENCODED_LEN];
4941        let mut buf = if avail_len < Self::ENCODED_LEN {
4942            payload_buf[0..avail_len].copy_from_slice(__input);
4943            Bytes::new(&payload_buf)
4944        } else {
4945            Bytes::new(__input)
4946        };
4947        let mut __struct = Self::default();
4948        __struct.ICAO_address = buf.get_u32_le();
4949        __struct.lat = buf.get_i32_le();
4950        __struct.lon = buf.get_i32_le();
4951        __struct.altitude = buf.get_i32_le();
4952        __struct.heading = buf.get_u16_le();
4953        __struct.hor_velocity = buf.get_u16_le();
4954        __struct.ver_velocity = buf.get_i16_le();
4955        let tmp = buf.get_u16_le();
4956        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4957            ::mavlink_core::error::ParserError::InvalidFlag {
4958                flag_type: "AdsbFlags",
4959                value: tmp as u32,
4960            },
4961        )?;
4962        __struct.squawk = buf.get_u16_le();
4963        let tmp = buf.get_u8();
4964        __struct.altitude_type =
4965            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4966                enum_type: "AdsbAltitudeType",
4967                value: tmp as u32,
4968            })?;
4969        for v in &mut __struct.callsign {
4970            let val = buf.get_u8();
4971            *v = val;
4972        }
4973        let tmp = buf.get_u8();
4974        __struct.emitter_type =
4975            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4976                enum_type: "AdsbEmitterType",
4977                value: tmp as u32,
4978            })?;
4979        __struct.tslc = buf.get_u8();
4980        Ok(__struct)
4981    }
4982    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4983        let mut __tmp = BytesMut::new(bytes);
4984        #[allow(clippy::absurd_extreme_comparisons)]
4985        #[allow(unused_comparisons)]
4986        if __tmp.remaining() < Self::ENCODED_LEN {
4987            panic!(
4988                "buffer is too small (need {} bytes, but got {})",
4989                Self::ENCODED_LEN,
4990                __tmp.remaining(),
4991            )
4992        }
4993        __tmp.put_u32_le(self.ICAO_address);
4994        __tmp.put_i32_le(self.lat);
4995        __tmp.put_i32_le(self.lon);
4996        __tmp.put_i32_le(self.altitude);
4997        __tmp.put_u16_le(self.heading);
4998        __tmp.put_u16_le(self.hor_velocity);
4999        __tmp.put_i16_le(self.ver_velocity);
5000        __tmp.put_u16_le(self.flags.bits());
5001        __tmp.put_u16_le(self.squawk);
5002        __tmp.put_u8(self.altitude_type as u8);
5003        for val in &self.callsign {
5004            __tmp.put_u8(*val);
5005        }
5006        __tmp.put_u8(self.emitter_type as u8);
5007        __tmp.put_u8(self.tslc);
5008        if matches!(version, MavlinkVersion::V2) {
5009            let len = __tmp.len();
5010            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5011        } else {
5012            __tmp.len()
5013        }
5014    }
5015}
5016#[doc = "The location and information of an AIS vessel."]
5017#[doc = ""]
5018#[doc = "ID: 301"]
5019#[derive(Debug, Clone, PartialEq)]
5020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5022#[cfg_attr(feature = "ts", derive(TS))]
5023#[cfg_attr(feature = "ts", ts(export))]
5024pub struct AIS_VESSEL_DATA {
5025    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5026    pub MMSI: u32,
5027    #[doc = "Latitude"]
5028    pub lat: i32,
5029    #[doc = "Longitude"]
5030    pub lon: i32,
5031    #[doc = "Course over ground"]
5032    pub COG: u16,
5033    #[doc = "True heading"]
5034    pub heading: u16,
5035    #[doc = "Speed over ground"]
5036    pub velocity: u16,
5037    #[doc = "Distance from lat/lon location to bow"]
5038    pub dimension_bow: u16,
5039    #[doc = "Distance from lat/lon location to stern"]
5040    pub dimension_stern: u16,
5041    #[doc = "Time since last communication in seconds"]
5042    pub tslc: u16,
5043    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5044    pub flags: AisFlags,
5045    #[doc = "Turn rate"]
5046    pub turn_rate: i8,
5047    #[doc = "Navigational status"]
5048    pub navigational_status: AisNavStatus,
5049    #[doc = "Type of vessels"]
5050    pub mavtype: AisType,
5051    #[doc = "Distance from lat/lon location to port side"]
5052    pub dimension_port: u8,
5053    #[doc = "Distance from lat/lon location to starboard side"]
5054    pub dimension_starboard: u8,
5055    #[doc = "The vessel callsign"]
5056    #[cfg_attr(
5057        feature = "serde",
5058        serde(
5059            serialize_with = "crate::nulstr::serialize::<_, 7>",
5060            deserialize_with = "crate::nulstr::deserialize::<_, 7>"
5061        )
5062    )]
5063    #[cfg_attr(feature = "ts", ts(type = "string"))]
5064    pub callsign: [u8; 7],
5065    #[doc = "The vessel name"]
5066    #[cfg_attr(
5067        feature = "serde",
5068        serde(
5069            serialize_with = "crate::nulstr::serialize::<_, 20>",
5070            deserialize_with = "crate::nulstr::deserialize::<_, 20>"
5071        )
5072    )]
5073    #[cfg_attr(feature = "ts", ts(type = "string"))]
5074    pub name: [u8; 20],
5075}
5076impl AIS_VESSEL_DATA {
5077    pub const ENCODED_LEN: usize = 58usize;
5078    pub const DEFAULT: Self = Self {
5079        MMSI: 0_u32,
5080        lat: 0_i32,
5081        lon: 0_i32,
5082        COG: 0_u16,
5083        heading: 0_u16,
5084        velocity: 0_u16,
5085        dimension_bow: 0_u16,
5086        dimension_stern: 0_u16,
5087        tslc: 0_u16,
5088        flags: AisFlags::DEFAULT,
5089        turn_rate: 0_i8,
5090        navigational_status: AisNavStatus::DEFAULT,
5091        mavtype: AisType::DEFAULT,
5092        dimension_port: 0_u8,
5093        dimension_starboard: 0_u8,
5094        callsign: [0_u8; 7usize],
5095        name: [0_u8; 20usize],
5096    };
5097    #[cfg(feature = "arbitrary")]
5098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5099        use arbitrary::{Arbitrary, Unstructured};
5100        let mut buf = [0u8; 1024];
5101        rng.fill_bytes(&mut buf);
5102        let mut unstructured = Unstructured::new(&buf);
5103        Self::arbitrary(&mut unstructured).unwrap_or_default()
5104    }
5105}
5106impl Default for AIS_VESSEL_DATA {
5107    fn default() -> Self {
5108        Self::DEFAULT.clone()
5109    }
5110}
5111impl MessageData for AIS_VESSEL_DATA {
5112    type Message = MavMessage;
5113    const ID: u32 = 301u32;
5114    const NAME: &'static str = "AIS_VESSEL";
5115    const EXTRA_CRC: u8 = 243u8;
5116    const ENCODED_LEN: usize = 58usize;
5117    fn deser(
5118        _version: MavlinkVersion,
5119        __input: &[u8],
5120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5121        let avail_len = __input.len();
5122        let mut payload_buf = [0; Self::ENCODED_LEN];
5123        let mut buf = if avail_len < Self::ENCODED_LEN {
5124            payload_buf[0..avail_len].copy_from_slice(__input);
5125            Bytes::new(&payload_buf)
5126        } else {
5127            Bytes::new(__input)
5128        };
5129        let mut __struct = Self::default();
5130        __struct.MMSI = buf.get_u32_le();
5131        __struct.lat = buf.get_i32_le();
5132        __struct.lon = buf.get_i32_le();
5133        __struct.COG = buf.get_u16_le();
5134        __struct.heading = buf.get_u16_le();
5135        __struct.velocity = buf.get_u16_le();
5136        __struct.dimension_bow = buf.get_u16_le();
5137        __struct.dimension_stern = buf.get_u16_le();
5138        __struct.tslc = buf.get_u16_le();
5139        let tmp = buf.get_u16_le();
5140        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5141            ::mavlink_core::error::ParserError::InvalidFlag {
5142                flag_type: "AisFlags",
5143                value: tmp as u32,
5144            },
5145        )?;
5146        __struct.turn_rate = buf.get_i8();
5147        let tmp = buf.get_u8();
5148        __struct.navigational_status =
5149            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5150                enum_type: "AisNavStatus",
5151                value: tmp as u32,
5152            })?;
5153        let tmp = buf.get_u8();
5154        __struct.mavtype =
5155            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5156                enum_type: "AisType",
5157                value: tmp as u32,
5158            })?;
5159        __struct.dimension_port = buf.get_u8();
5160        __struct.dimension_starboard = buf.get_u8();
5161        for v in &mut __struct.callsign {
5162            let val = buf.get_u8();
5163            *v = val;
5164        }
5165        for v in &mut __struct.name {
5166            let val = buf.get_u8();
5167            *v = val;
5168        }
5169        Ok(__struct)
5170    }
5171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5172        let mut __tmp = BytesMut::new(bytes);
5173        #[allow(clippy::absurd_extreme_comparisons)]
5174        #[allow(unused_comparisons)]
5175        if __tmp.remaining() < Self::ENCODED_LEN {
5176            panic!(
5177                "buffer is too small (need {} bytes, but got {})",
5178                Self::ENCODED_LEN,
5179                __tmp.remaining(),
5180            )
5181        }
5182        __tmp.put_u32_le(self.MMSI);
5183        __tmp.put_i32_le(self.lat);
5184        __tmp.put_i32_le(self.lon);
5185        __tmp.put_u16_le(self.COG);
5186        __tmp.put_u16_le(self.heading);
5187        __tmp.put_u16_le(self.velocity);
5188        __tmp.put_u16_le(self.dimension_bow);
5189        __tmp.put_u16_le(self.dimension_stern);
5190        __tmp.put_u16_le(self.tslc);
5191        __tmp.put_u16_le(self.flags.bits());
5192        __tmp.put_i8(self.turn_rate);
5193        __tmp.put_u8(self.navigational_status as u8);
5194        __tmp.put_u8(self.mavtype as u8);
5195        __tmp.put_u8(self.dimension_port);
5196        __tmp.put_u8(self.dimension_starboard);
5197        for val in &self.callsign {
5198            __tmp.put_u8(*val);
5199        }
5200        for val in &self.name {
5201            __tmp.put_u8(*val);
5202        }
5203        if matches!(version, MavlinkVersion::V2) {
5204            let len = __tmp.len();
5205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5206        } else {
5207            __tmp.len()
5208        }
5209    }
5210}
5211#[doc = "The current system altitude."]
5212#[doc = ""]
5213#[doc = "ID: 141"]
5214#[derive(Debug, Clone, PartialEq)]
5215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5217#[cfg_attr(feature = "ts", derive(TS))]
5218#[cfg_attr(feature = "ts", ts(export))]
5219pub struct ALTITUDE_DATA {
5220    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5221    pub time_usec: u64,
5222    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5223    pub altitude_monotonic: f32,
5224    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5225    pub altitude_amsl: f32,
5226    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5227    pub altitude_local: f32,
5228    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5229    pub altitude_relative: f32,
5230    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5231    pub altitude_terrain: f32,
5232    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5233    pub bottom_clearance: f32,
5234}
5235impl ALTITUDE_DATA {
5236    pub const ENCODED_LEN: usize = 32usize;
5237    pub const DEFAULT: Self = Self {
5238        time_usec: 0_u64,
5239        altitude_monotonic: 0.0_f32,
5240        altitude_amsl: 0.0_f32,
5241        altitude_local: 0.0_f32,
5242        altitude_relative: 0.0_f32,
5243        altitude_terrain: 0.0_f32,
5244        bottom_clearance: 0.0_f32,
5245    };
5246    #[cfg(feature = "arbitrary")]
5247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5248        use arbitrary::{Arbitrary, Unstructured};
5249        let mut buf = [0u8; 1024];
5250        rng.fill_bytes(&mut buf);
5251        let mut unstructured = Unstructured::new(&buf);
5252        Self::arbitrary(&mut unstructured).unwrap_or_default()
5253    }
5254}
5255impl Default for ALTITUDE_DATA {
5256    fn default() -> Self {
5257        Self::DEFAULT.clone()
5258    }
5259}
5260impl MessageData for ALTITUDE_DATA {
5261    type Message = MavMessage;
5262    const ID: u32 = 141u32;
5263    const NAME: &'static str = "ALTITUDE";
5264    const EXTRA_CRC: u8 = 47u8;
5265    const ENCODED_LEN: usize = 32usize;
5266    fn deser(
5267        _version: MavlinkVersion,
5268        __input: &[u8],
5269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5270        let avail_len = __input.len();
5271        let mut payload_buf = [0; Self::ENCODED_LEN];
5272        let mut buf = if avail_len < Self::ENCODED_LEN {
5273            payload_buf[0..avail_len].copy_from_slice(__input);
5274            Bytes::new(&payload_buf)
5275        } else {
5276            Bytes::new(__input)
5277        };
5278        let mut __struct = Self::default();
5279        __struct.time_usec = buf.get_u64_le();
5280        __struct.altitude_monotonic = buf.get_f32_le();
5281        __struct.altitude_amsl = buf.get_f32_le();
5282        __struct.altitude_local = buf.get_f32_le();
5283        __struct.altitude_relative = buf.get_f32_le();
5284        __struct.altitude_terrain = buf.get_f32_le();
5285        __struct.bottom_clearance = buf.get_f32_le();
5286        Ok(__struct)
5287    }
5288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5289        let mut __tmp = BytesMut::new(bytes);
5290        #[allow(clippy::absurd_extreme_comparisons)]
5291        #[allow(unused_comparisons)]
5292        if __tmp.remaining() < Self::ENCODED_LEN {
5293            panic!(
5294                "buffer is too small (need {} bytes, but got {})",
5295                Self::ENCODED_LEN,
5296                __tmp.remaining(),
5297            )
5298        }
5299        __tmp.put_u64_le(self.time_usec);
5300        __tmp.put_f32_le(self.altitude_monotonic);
5301        __tmp.put_f32_le(self.altitude_amsl);
5302        __tmp.put_f32_le(self.altitude_local);
5303        __tmp.put_f32_le(self.altitude_relative);
5304        __tmp.put_f32_le(self.altitude_terrain);
5305        __tmp.put_f32_le(self.bottom_clearance);
5306        if matches!(version, MavlinkVersion::V2) {
5307            let len = __tmp.len();
5308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5309        } else {
5310            __tmp.len()
5311        }
5312    }
5313}
5314#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5315#[doc = ""]
5316#[doc = "ID: 30"]
5317#[derive(Debug, Clone, PartialEq)]
5318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5320#[cfg_attr(feature = "ts", derive(TS))]
5321#[cfg_attr(feature = "ts", ts(export))]
5322pub struct ATTITUDE_DATA {
5323    #[doc = "Timestamp (time since system boot)."]
5324    pub time_boot_ms: u32,
5325    #[doc = "Roll angle (-pi..+pi)"]
5326    pub roll: f32,
5327    #[doc = "Pitch angle (-pi..+pi)"]
5328    pub pitch: f32,
5329    #[doc = "Yaw angle (-pi..+pi)"]
5330    pub yaw: f32,
5331    #[doc = "Roll angular speed"]
5332    pub rollspeed: f32,
5333    #[doc = "Pitch angular speed"]
5334    pub pitchspeed: f32,
5335    #[doc = "Yaw angular speed"]
5336    pub yawspeed: f32,
5337}
5338impl ATTITUDE_DATA {
5339    pub const ENCODED_LEN: usize = 28usize;
5340    pub const DEFAULT: Self = Self {
5341        time_boot_ms: 0_u32,
5342        roll: 0.0_f32,
5343        pitch: 0.0_f32,
5344        yaw: 0.0_f32,
5345        rollspeed: 0.0_f32,
5346        pitchspeed: 0.0_f32,
5347        yawspeed: 0.0_f32,
5348    };
5349    #[cfg(feature = "arbitrary")]
5350    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5351        use arbitrary::{Arbitrary, Unstructured};
5352        let mut buf = [0u8; 1024];
5353        rng.fill_bytes(&mut buf);
5354        let mut unstructured = Unstructured::new(&buf);
5355        Self::arbitrary(&mut unstructured).unwrap_or_default()
5356    }
5357}
5358impl Default for ATTITUDE_DATA {
5359    fn default() -> Self {
5360        Self::DEFAULT.clone()
5361    }
5362}
5363impl MessageData for ATTITUDE_DATA {
5364    type Message = MavMessage;
5365    const ID: u32 = 30u32;
5366    const NAME: &'static str = "ATTITUDE";
5367    const EXTRA_CRC: u8 = 39u8;
5368    const ENCODED_LEN: usize = 28usize;
5369    fn deser(
5370        _version: MavlinkVersion,
5371        __input: &[u8],
5372    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5373        let avail_len = __input.len();
5374        let mut payload_buf = [0; Self::ENCODED_LEN];
5375        let mut buf = if avail_len < Self::ENCODED_LEN {
5376            payload_buf[0..avail_len].copy_from_slice(__input);
5377            Bytes::new(&payload_buf)
5378        } else {
5379            Bytes::new(__input)
5380        };
5381        let mut __struct = Self::default();
5382        __struct.time_boot_ms = buf.get_u32_le();
5383        __struct.roll = buf.get_f32_le();
5384        __struct.pitch = buf.get_f32_le();
5385        __struct.yaw = buf.get_f32_le();
5386        __struct.rollspeed = buf.get_f32_le();
5387        __struct.pitchspeed = buf.get_f32_le();
5388        __struct.yawspeed = buf.get_f32_le();
5389        Ok(__struct)
5390    }
5391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5392        let mut __tmp = BytesMut::new(bytes);
5393        #[allow(clippy::absurd_extreme_comparisons)]
5394        #[allow(unused_comparisons)]
5395        if __tmp.remaining() < Self::ENCODED_LEN {
5396            panic!(
5397                "buffer is too small (need {} bytes, but got {})",
5398                Self::ENCODED_LEN,
5399                __tmp.remaining(),
5400            )
5401        }
5402        __tmp.put_u32_le(self.time_boot_ms);
5403        __tmp.put_f32_le(self.roll);
5404        __tmp.put_f32_le(self.pitch);
5405        __tmp.put_f32_le(self.yaw);
5406        __tmp.put_f32_le(self.rollspeed);
5407        __tmp.put_f32_le(self.pitchspeed);
5408        __tmp.put_f32_le(self.yawspeed);
5409        if matches!(version, MavlinkVersion::V2) {
5410            let len = __tmp.len();
5411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5412        } else {
5413            __tmp.len()
5414        }
5415    }
5416}
5417#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5418#[doc = ""]
5419#[doc = "ID: 31"]
5420#[derive(Debug, Clone, PartialEq)]
5421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5423#[cfg_attr(feature = "ts", derive(TS))]
5424#[cfg_attr(feature = "ts", ts(export))]
5425pub struct ATTITUDE_QUATERNION_DATA {
5426    #[doc = "Timestamp (time since system boot)."]
5427    pub time_boot_ms: u32,
5428    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5429    pub q1: f32,
5430    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5431    pub q2: f32,
5432    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5433    pub q3: f32,
5434    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5435    pub q4: f32,
5436    #[doc = "Roll angular speed"]
5437    pub rollspeed: f32,
5438    #[doc = "Pitch angular speed"]
5439    pub pitchspeed: f32,
5440    #[doc = "Yaw angular speed"]
5441    pub yawspeed: f32,
5442    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5446    pub repr_offset_q: [f32; 4],
5447}
5448impl ATTITUDE_QUATERNION_DATA {
5449    pub const ENCODED_LEN: usize = 48usize;
5450    pub const DEFAULT: Self = Self {
5451        time_boot_ms: 0_u32,
5452        q1: 0.0_f32,
5453        q2: 0.0_f32,
5454        q3: 0.0_f32,
5455        q4: 0.0_f32,
5456        rollspeed: 0.0_f32,
5457        pitchspeed: 0.0_f32,
5458        yawspeed: 0.0_f32,
5459        repr_offset_q: [0.0_f32; 4usize],
5460    };
5461    #[cfg(feature = "arbitrary")]
5462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5463        use arbitrary::{Arbitrary, Unstructured};
5464        let mut buf = [0u8; 1024];
5465        rng.fill_bytes(&mut buf);
5466        let mut unstructured = Unstructured::new(&buf);
5467        Self::arbitrary(&mut unstructured).unwrap_or_default()
5468    }
5469}
5470impl Default for ATTITUDE_QUATERNION_DATA {
5471    fn default() -> Self {
5472        Self::DEFAULT.clone()
5473    }
5474}
5475impl MessageData for ATTITUDE_QUATERNION_DATA {
5476    type Message = MavMessage;
5477    const ID: u32 = 31u32;
5478    const NAME: &'static str = "ATTITUDE_QUATERNION";
5479    const EXTRA_CRC: u8 = 246u8;
5480    const ENCODED_LEN: usize = 48usize;
5481    fn deser(
5482        _version: MavlinkVersion,
5483        __input: &[u8],
5484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5485        let avail_len = __input.len();
5486        let mut payload_buf = [0; Self::ENCODED_LEN];
5487        let mut buf = if avail_len < Self::ENCODED_LEN {
5488            payload_buf[0..avail_len].copy_from_slice(__input);
5489            Bytes::new(&payload_buf)
5490        } else {
5491            Bytes::new(__input)
5492        };
5493        let mut __struct = Self::default();
5494        __struct.time_boot_ms = buf.get_u32_le();
5495        __struct.q1 = buf.get_f32_le();
5496        __struct.q2 = buf.get_f32_le();
5497        __struct.q3 = buf.get_f32_le();
5498        __struct.q4 = buf.get_f32_le();
5499        __struct.rollspeed = buf.get_f32_le();
5500        __struct.pitchspeed = buf.get_f32_le();
5501        __struct.yawspeed = buf.get_f32_le();
5502        for v in &mut __struct.repr_offset_q {
5503            let val = buf.get_f32_le();
5504            *v = val;
5505        }
5506        Ok(__struct)
5507    }
5508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5509        let mut __tmp = BytesMut::new(bytes);
5510        #[allow(clippy::absurd_extreme_comparisons)]
5511        #[allow(unused_comparisons)]
5512        if __tmp.remaining() < Self::ENCODED_LEN {
5513            panic!(
5514                "buffer is too small (need {} bytes, but got {})",
5515                Self::ENCODED_LEN,
5516                __tmp.remaining(),
5517            )
5518        }
5519        __tmp.put_u32_le(self.time_boot_ms);
5520        __tmp.put_f32_le(self.q1);
5521        __tmp.put_f32_le(self.q2);
5522        __tmp.put_f32_le(self.q3);
5523        __tmp.put_f32_le(self.q4);
5524        __tmp.put_f32_le(self.rollspeed);
5525        __tmp.put_f32_le(self.pitchspeed);
5526        __tmp.put_f32_le(self.yawspeed);
5527        if matches!(version, MavlinkVersion::V2) {
5528            for val in &self.repr_offset_q {
5529                __tmp.put_f32_le(*val);
5530            }
5531            let len = __tmp.len();
5532            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5533        } else {
5534            __tmp.len()
5535        }
5536    }
5537}
5538#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5539#[doc = ""]
5540#[doc = "ID: 61"]
5541#[derive(Debug, Clone, PartialEq)]
5542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5543#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5544#[cfg_attr(feature = "ts", derive(TS))]
5545#[cfg_attr(feature = "ts", ts(export))]
5546pub struct ATTITUDE_QUATERNION_COV_DATA {
5547    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5548    pub time_usec: u64,
5549    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5550    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5551    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5552    pub q: [f32; 4],
5553    #[doc = "Roll angular speed"]
5554    pub rollspeed: f32,
5555    #[doc = "Pitch angular speed"]
5556    pub pitchspeed: f32,
5557    #[doc = "Yaw angular speed"]
5558    pub yawspeed: f32,
5559    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5561    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5562    pub covariance: [f32; 9],
5563}
5564impl ATTITUDE_QUATERNION_COV_DATA {
5565    pub const ENCODED_LEN: usize = 72usize;
5566    pub const DEFAULT: Self = Self {
5567        time_usec: 0_u64,
5568        q: [0.0_f32; 4usize],
5569        rollspeed: 0.0_f32,
5570        pitchspeed: 0.0_f32,
5571        yawspeed: 0.0_f32,
5572        covariance: [0.0_f32; 9usize],
5573    };
5574    #[cfg(feature = "arbitrary")]
5575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5576        use arbitrary::{Arbitrary, Unstructured};
5577        let mut buf = [0u8; 1024];
5578        rng.fill_bytes(&mut buf);
5579        let mut unstructured = Unstructured::new(&buf);
5580        Self::arbitrary(&mut unstructured).unwrap_or_default()
5581    }
5582}
5583impl Default for ATTITUDE_QUATERNION_COV_DATA {
5584    fn default() -> Self {
5585        Self::DEFAULT.clone()
5586    }
5587}
5588impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5589    type Message = MavMessage;
5590    const ID: u32 = 61u32;
5591    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5592    const EXTRA_CRC: u8 = 167u8;
5593    const ENCODED_LEN: usize = 72usize;
5594    fn deser(
5595        _version: MavlinkVersion,
5596        __input: &[u8],
5597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5598        let avail_len = __input.len();
5599        let mut payload_buf = [0; Self::ENCODED_LEN];
5600        let mut buf = if avail_len < Self::ENCODED_LEN {
5601            payload_buf[0..avail_len].copy_from_slice(__input);
5602            Bytes::new(&payload_buf)
5603        } else {
5604            Bytes::new(__input)
5605        };
5606        let mut __struct = Self::default();
5607        __struct.time_usec = buf.get_u64_le();
5608        for v in &mut __struct.q {
5609            let val = buf.get_f32_le();
5610            *v = val;
5611        }
5612        __struct.rollspeed = buf.get_f32_le();
5613        __struct.pitchspeed = buf.get_f32_le();
5614        __struct.yawspeed = buf.get_f32_le();
5615        for v in &mut __struct.covariance {
5616            let val = buf.get_f32_le();
5617            *v = val;
5618        }
5619        Ok(__struct)
5620    }
5621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5622        let mut __tmp = BytesMut::new(bytes);
5623        #[allow(clippy::absurd_extreme_comparisons)]
5624        #[allow(unused_comparisons)]
5625        if __tmp.remaining() < Self::ENCODED_LEN {
5626            panic!(
5627                "buffer is too small (need {} bytes, but got {})",
5628                Self::ENCODED_LEN,
5629                __tmp.remaining(),
5630            )
5631        }
5632        __tmp.put_u64_le(self.time_usec);
5633        for val in &self.q {
5634            __tmp.put_f32_le(*val);
5635        }
5636        __tmp.put_f32_le(self.rollspeed);
5637        __tmp.put_f32_le(self.pitchspeed);
5638        __tmp.put_f32_le(self.yawspeed);
5639        for val in &self.covariance {
5640            __tmp.put_f32_le(*val);
5641        }
5642        if matches!(version, MavlinkVersion::V2) {
5643            let len = __tmp.len();
5644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5645        } else {
5646            __tmp.len()
5647        }
5648    }
5649}
5650#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5651#[doc = ""]
5652#[doc = "ID: 83"]
5653#[derive(Debug, Clone, PartialEq)]
5654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5656#[cfg_attr(feature = "ts", derive(TS))]
5657#[cfg_attr(feature = "ts", ts(export))]
5658pub struct ATTITUDE_TARGET_DATA {
5659    #[doc = "Timestamp (time since system boot)."]
5660    pub time_boot_ms: u32,
5661    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5662    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5663    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5664    pub q: [f32; 4],
5665    #[doc = "Body roll rate"]
5666    pub body_roll_rate: f32,
5667    #[doc = "Body pitch rate"]
5668    pub body_pitch_rate: f32,
5669    #[doc = "Body yaw rate"]
5670    pub body_yaw_rate: f32,
5671    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5672    pub thrust: f32,
5673    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5674    pub type_mask: AttitudeTargetTypemask,
5675}
5676impl ATTITUDE_TARGET_DATA {
5677    pub const ENCODED_LEN: usize = 37usize;
5678    pub const DEFAULT: Self = Self {
5679        time_boot_ms: 0_u32,
5680        q: [0.0_f32; 4usize],
5681        body_roll_rate: 0.0_f32,
5682        body_pitch_rate: 0.0_f32,
5683        body_yaw_rate: 0.0_f32,
5684        thrust: 0.0_f32,
5685        type_mask: AttitudeTargetTypemask::DEFAULT,
5686    };
5687    #[cfg(feature = "arbitrary")]
5688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5689        use arbitrary::{Arbitrary, Unstructured};
5690        let mut buf = [0u8; 1024];
5691        rng.fill_bytes(&mut buf);
5692        let mut unstructured = Unstructured::new(&buf);
5693        Self::arbitrary(&mut unstructured).unwrap_or_default()
5694    }
5695}
5696impl Default for ATTITUDE_TARGET_DATA {
5697    fn default() -> Self {
5698        Self::DEFAULT.clone()
5699    }
5700}
5701impl MessageData for ATTITUDE_TARGET_DATA {
5702    type Message = MavMessage;
5703    const ID: u32 = 83u32;
5704    const NAME: &'static str = "ATTITUDE_TARGET";
5705    const EXTRA_CRC: u8 = 22u8;
5706    const ENCODED_LEN: usize = 37usize;
5707    fn deser(
5708        _version: MavlinkVersion,
5709        __input: &[u8],
5710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5711        let avail_len = __input.len();
5712        let mut payload_buf = [0; Self::ENCODED_LEN];
5713        let mut buf = if avail_len < Self::ENCODED_LEN {
5714            payload_buf[0..avail_len].copy_from_slice(__input);
5715            Bytes::new(&payload_buf)
5716        } else {
5717            Bytes::new(__input)
5718        };
5719        let mut __struct = Self::default();
5720        __struct.time_boot_ms = buf.get_u32_le();
5721        for v in &mut __struct.q {
5722            let val = buf.get_f32_le();
5723            *v = val;
5724        }
5725        __struct.body_roll_rate = buf.get_f32_le();
5726        __struct.body_pitch_rate = buf.get_f32_le();
5727        __struct.body_yaw_rate = buf.get_f32_le();
5728        __struct.thrust = buf.get_f32_le();
5729        let tmp = buf.get_u8();
5730        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5731            tmp & AttitudeTargetTypemask::all().bits(),
5732        )
5733        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5734            flag_type: "AttitudeTargetTypemask",
5735            value: tmp as u32,
5736        })?;
5737        Ok(__struct)
5738    }
5739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5740        let mut __tmp = BytesMut::new(bytes);
5741        #[allow(clippy::absurd_extreme_comparisons)]
5742        #[allow(unused_comparisons)]
5743        if __tmp.remaining() < Self::ENCODED_LEN {
5744            panic!(
5745                "buffer is too small (need {} bytes, but got {})",
5746                Self::ENCODED_LEN,
5747                __tmp.remaining(),
5748            )
5749        }
5750        __tmp.put_u32_le(self.time_boot_ms);
5751        for val in &self.q {
5752            __tmp.put_f32_le(*val);
5753        }
5754        __tmp.put_f32_le(self.body_roll_rate);
5755        __tmp.put_f32_le(self.body_pitch_rate);
5756        __tmp.put_f32_le(self.body_yaw_rate);
5757        __tmp.put_f32_le(self.thrust);
5758        __tmp.put_u8(self.type_mask.bits());
5759        if matches!(version, MavlinkVersion::V2) {
5760            let len = __tmp.len();
5761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5762        } else {
5763            __tmp.len()
5764        }
5765    }
5766}
5767#[doc = "Motion capture attitude and position."]
5768#[doc = ""]
5769#[doc = "ID: 138"]
5770#[derive(Debug, Clone, PartialEq)]
5771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5773#[cfg_attr(feature = "ts", derive(TS))]
5774#[cfg_attr(feature = "ts", ts(export))]
5775pub struct ATT_POS_MOCAP_DATA {
5776    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5777    pub time_usec: u64,
5778    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5781    pub q: [f32; 4],
5782    #[doc = "X position (NED)"]
5783    pub x: f32,
5784    #[doc = "Y position (NED)"]
5785    pub y: f32,
5786    #[doc = "Z position (NED)"]
5787    pub z: f32,
5788    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5789    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5790    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5791    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5792    pub covariance: [f32; 21],
5793}
5794impl ATT_POS_MOCAP_DATA {
5795    pub const ENCODED_LEN: usize = 120usize;
5796    pub const DEFAULT: Self = Self {
5797        time_usec: 0_u64,
5798        q: [0.0_f32; 4usize],
5799        x: 0.0_f32,
5800        y: 0.0_f32,
5801        z: 0.0_f32,
5802        covariance: [0.0_f32; 21usize],
5803    };
5804    #[cfg(feature = "arbitrary")]
5805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5806        use arbitrary::{Arbitrary, Unstructured};
5807        let mut buf = [0u8; 1024];
5808        rng.fill_bytes(&mut buf);
5809        let mut unstructured = Unstructured::new(&buf);
5810        Self::arbitrary(&mut unstructured).unwrap_or_default()
5811    }
5812}
5813impl Default for ATT_POS_MOCAP_DATA {
5814    fn default() -> Self {
5815        Self::DEFAULT.clone()
5816    }
5817}
5818impl MessageData for ATT_POS_MOCAP_DATA {
5819    type Message = MavMessage;
5820    const ID: u32 = 138u32;
5821    const NAME: &'static str = "ATT_POS_MOCAP";
5822    const EXTRA_CRC: u8 = 109u8;
5823    const ENCODED_LEN: usize = 120usize;
5824    fn deser(
5825        _version: MavlinkVersion,
5826        __input: &[u8],
5827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5828        let avail_len = __input.len();
5829        let mut payload_buf = [0; Self::ENCODED_LEN];
5830        let mut buf = if avail_len < Self::ENCODED_LEN {
5831            payload_buf[0..avail_len].copy_from_slice(__input);
5832            Bytes::new(&payload_buf)
5833        } else {
5834            Bytes::new(__input)
5835        };
5836        let mut __struct = Self::default();
5837        __struct.time_usec = buf.get_u64_le();
5838        for v in &mut __struct.q {
5839            let val = buf.get_f32_le();
5840            *v = val;
5841        }
5842        __struct.x = buf.get_f32_le();
5843        __struct.y = buf.get_f32_le();
5844        __struct.z = buf.get_f32_le();
5845        for v in &mut __struct.covariance {
5846            let val = buf.get_f32_le();
5847            *v = val;
5848        }
5849        Ok(__struct)
5850    }
5851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5852        let mut __tmp = BytesMut::new(bytes);
5853        #[allow(clippy::absurd_extreme_comparisons)]
5854        #[allow(unused_comparisons)]
5855        if __tmp.remaining() < Self::ENCODED_LEN {
5856            panic!(
5857                "buffer is too small (need {} bytes, but got {})",
5858                Self::ENCODED_LEN,
5859                __tmp.remaining(),
5860            )
5861        }
5862        __tmp.put_u64_le(self.time_usec);
5863        for val in &self.q {
5864            __tmp.put_f32_le(*val);
5865        }
5866        __tmp.put_f32_le(self.x);
5867        __tmp.put_f32_le(self.y);
5868        __tmp.put_f32_le(self.z);
5869        if matches!(version, MavlinkVersion::V2) {
5870            for val in &self.covariance {
5871                __tmp.put_f32_le(*val);
5872            }
5873            let len = __tmp.len();
5874            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5875        } else {
5876            __tmp.len()
5877        }
5878    }
5879}
5880#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5881#[doc = ""]
5882#[doc = "ID: 7"]
5883#[derive(Debug, Clone, PartialEq)]
5884#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5885#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5886#[cfg_attr(feature = "ts", derive(TS))]
5887#[cfg_attr(feature = "ts", ts(export))]
5888pub struct AUTH_KEY_DATA {
5889    #[doc = "key"]
5890    #[cfg_attr(
5891        feature = "serde",
5892        serde(
5893            serialize_with = "crate::nulstr::serialize::<_, 32>",
5894            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
5895        )
5896    )]
5897    #[cfg_attr(feature = "ts", ts(type = "string"))]
5898    pub key: [u8; 32],
5899}
5900impl AUTH_KEY_DATA {
5901    pub const ENCODED_LEN: usize = 32usize;
5902    pub const DEFAULT: Self = Self {
5903        key: [0_u8; 32usize],
5904    };
5905    #[cfg(feature = "arbitrary")]
5906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5907        use arbitrary::{Arbitrary, Unstructured};
5908        let mut buf = [0u8; 1024];
5909        rng.fill_bytes(&mut buf);
5910        let mut unstructured = Unstructured::new(&buf);
5911        Self::arbitrary(&mut unstructured).unwrap_or_default()
5912    }
5913}
5914impl Default for AUTH_KEY_DATA {
5915    fn default() -> Self {
5916        Self::DEFAULT.clone()
5917    }
5918}
5919impl MessageData for AUTH_KEY_DATA {
5920    type Message = MavMessage;
5921    const ID: u32 = 7u32;
5922    const NAME: &'static str = "AUTH_KEY";
5923    const EXTRA_CRC: u8 = 119u8;
5924    const ENCODED_LEN: usize = 32usize;
5925    fn deser(
5926        _version: MavlinkVersion,
5927        __input: &[u8],
5928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5929        let avail_len = __input.len();
5930        let mut payload_buf = [0; Self::ENCODED_LEN];
5931        let mut buf = if avail_len < Self::ENCODED_LEN {
5932            payload_buf[0..avail_len].copy_from_slice(__input);
5933            Bytes::new(&payload_buf)
5934        } else {
5935            Bytes::new(__input)
5936        };
5937        let mut __struct = Self::default();
5938        for v in &mut __struct.key {
5939            let val = buf.get_u8();
5940            *v = val;
5941        }
5942        Ok(__struct)
5943    }
5944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5945        let mut __tmp = BytesMut::new(bytes);
5946        #[allow(clippy::absurd_extreme_comparisons)]
5947        #[allow(unused_comparisons)]
5948        if __tmp.remaining() < Self::ENCODED_LEN {
5949            panic!(
5950                "buffer is too small (need {} bytes, but got {})",
5951                Self::ENCODED_LEN,
5952                __tmp.remaining(),
5953            )
5954        }
5955        for val in &self.key {
5956            __tmp.put_u8(*val);
5957        }
5958        if matches!(version, MavlinkVersion::V2) {
5959            let len = __tmp.len();
5960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5961        } else {
5962            __tmp.len()
5963        }
5964    }
5965}
5966#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5967#[doc = ""]
5968#[doc = "ID: 286"]
5969#[derive(Debug, Clone, PartialEq)]
5970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5972#[cfg_attr(feature = "ts", derive(TS))]
5973#[cfg_attr(feature = "ts", ts(export))]
5974pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5975    #[doc = "Timestamp (time since system boot)."]
5976    pub time_boot_us: u64,
5977    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5979    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5980    pub q: [f32; 4],
5981    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5982    pub q_estimated_delay_us: u32,
5983    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5984    pub vx: f32,
5985    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5986    pub vy: f32,
5987    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5988    pub vz: f32,
5989    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5990    pub v_estimated_delay_us: u32,
5991    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5992    pub feed_forward_angular_velocity_z: f32,
5993    #[doc = "Bitmap indicating which estimator outputs are valid."]
5994    pub estimator_status: EstimatorStatusFlags,
5995    #[doc = "System ID"]
5996    pub target_system: u8,
5997    #[doc = "Component ID"]
5998    pub target_component: u8,
5999    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6000    pub landed_state: MavLandedState,
6001    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6002    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6003    pub angular_velocity_z: f32,
6004}
6005impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6006    pub const ENCODED_LEN: usize = 57usize;
6007    pub const DEFAULT: Self = Self {
6008        time_boot_us: 0_u64,
6009        q: [0.0_f32; 4usize],
6010        q_estimated_delay_us: 0_u32,
6011        vx: 0.0_f32,
6012        vy: 0.0_f32,
6013        vz: 0.0_f32,
6014        v_estimated_delay_us: 0_u32,
6015        feed_forward_angular_velocity_z: 0.0_f32,
6016        estimator_status: EstimatorStatusFlags::DEFAULT,
6017        target_system: 0_u8,
6018        target_component: 0_u8,
6019        landed_state: MavLandedState::DEFAULT,
6020        angular_velocity_z: 0.0_f32,
6021    };
6022    #[cfg(feature = "arbitrary")]
6023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6024        use arbitrary::{Arbitrary, Unstructured};
6025        let mut buf = [0u8; 1024];
6026        rng.fill_bytes(&mut buf);
6027        let mut unstructured = Unstructured::new(&buf);
6028        Self::arbitrary(&mut unstructured).unwrap_or_default()
6029    }
6030}
6031impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6032    fn default() -> Self {
6033        Self::DEFAULT.clone()
6034    }
6035}
6036impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6037    type Message = MavMessage;
6038    const ID: u32 = 286u32;
6039    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6040    const EXTRA_CRC: u8 = 210u8;
6041    const ENCODED_LEN: usize = 57usize;
6042    fn deser(
6043        _version: MavlinkVersion,
6044        __input: &[u8],
6045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6046        let avail_len = __input.len();
6047        let mut payload_buf = [0; Self::ENCODED_LEN];
6048        let mut buf = if avail_len < Self::ENCODED_LEN {
6049            payload_buf[0..avail_len].copy_from_slice(__input);
6050            Bytes::new(&payload_buf)
6051        } else {
6052            Bytes::new(__input)
6053        };
6054        let mut __struct = Self::default();
6055        __struct.time_boot_us = buf.get_u64_le();
6056        for v in &mut __struct.q {
6057            let val = buf.get_f32_le();
6058            *v = val;
6059        }
6060        __struct.q_estimated_delay_us = buf.get_u32_le();
6061        __struct.vx = buf.get_f32_le();
6062        __struct.vy = buf.get_f32_le();
6063        __struct.vz = buf.get_f32_le();
6064        __struct.v_estimated_delay_us = buf.get_u32_le();
6065        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6066        let tmp = buf.get_u16_le();
6067        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6068            tmp & EstimatorStatusFlags::all().bits(),
6069        )
6070        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6071            flag_type: "EstimatorStatusFlags",
6072            value: tmp as u32,
6073        })?;
6074        __struct.target_system = buf.get_u8();
6075        __struct.target_component = buf.get_u8();
6076        let tmp = buf.get_u8();
6077        __struct.landed_state =
6078            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6079                enum_type: "MavLandedState",
6080                value: tmp as u32,
6081            })?;
6082        __struct.angular_velocity_z = buf.get_f32_le();
6083        Ok(__struct)
6084    }
6085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6086        let mut __tmp = BytesMut::new(bytes);
6087        #[allow(clippy::absurd_extreme_comparisons)]
6088        #[allow(unused_comparisons)]
6089        if __tmp.remaining() < Self::ENCODED_LEN {
6090            panic!(
6091                "buffer is too small (need {} bytes, but got {})",
6092                Self::ENCODED_LEN,
6093                __tmp.remaining(),
6094            )
6095        }
6096        __tmp.put_u64_le(self.time_boot_us);
6097        for val in &self.q {
6098            __tmp.put_f32_le(*val);
6099        }
6100        __tmp.put_u32_le(self.q_estimated_delay_us);
6101        __tmp.put_f32_le(self.vx);
6102        __tmp.put_f32_le(self.vy);
6103        __tmp.put_f32_le(self.vz);
6104        __tmp.put_u32_le(self.v_estimated_delay_us);
6105        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6106        __tmp.put_u16_le(self.estimator_status.bits());
6107        __tmp.put_u8(self.target_system);
6108        __tmp.put_u8(self.target_component);
6109        __tmp.put_u8(self.landed_state as u8);
6110        if matches!(version, MavlinkVersion::V2) {
6111            __tmp.put_f32_le(self.angular_velocity_z);
6112            let len = __tmp.len();
6113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6114        } else {
6115            __tmp.len()
6116        }
6117    }
6118}
6119#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6120#[doc = ""]
6121#[doc = "ID: 148"]
6122#[derive(Debug, Clone, PartialEq)]
6123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6125#[cfg_attr(feature = "ts", derive(TS))]
6126#[cfg_attr(feature = "ts", ts(export))]
6127pub struct AUTOPILOT_VERSION_DATA {
6128    #[doc = "Bitmap of capabilities"]
6129    pub capabilities: MavProtocolCapability,
6130    #[doc = "UID if provided by hardware (see uid2)"]
6131    pub uid: u64,
6132    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6133    pub flight_sw_version: u32,
6134    #[doc = "Middleware version number"]
6135    pub middleware_sw_version: u32,
6136    #[doc = "Operating system version number"]
6137    pub os_sw_version: u32,
6138    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6139    pub board_version: u32,
6140    #[doc = "ID of the board vendor"]
6141    pub vendor_id: u16,
6142    #[doc = "ID of the product"]
6143    pub product_id: u16,
6144    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6145    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6146    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6147    pub flight_custom_version: [u8; 8],
6148    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6151    pub middleware_custom_version: [u8; 8],
6152    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6153    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6154    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6155    pub os_custom_version: [u8; 8],
6156    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6157    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6158    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6159    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6160    pub uid2: [u8; 18],
6161}
6162impl AUTOPILOT_VERSION_DATA {
6163    pub const ENCODED_LEN: usize = 78usize;
6164    pub const DEFAULT: Self = Self {
6165        capabilities: MavProtocolCapability::DEFAULT,
6166        uid: 0_u64,
6167        flight_sw_version: 0_u32,
6168        middleware_sw_version: 0_u32,
6169        os_sw_version: 0_u32,
6170        board_version: 0_u32,
6171        vendor_id: 0_u16,
6172        product_id: 0_u16,
6173        flight_custom_version: [0_u8; 8usize],
6174        middleware_custom_version: [0_u8; 8usize],
6175        os_custom_version: [0_u8; 8usize],
6176        uid2: [0_u8; 18usize],
6177    };
6178    #[cfg(feature = "arbitrary")]
6179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6180        use arbitrary::{Arbitrary, Unstructured};
6181        let mut buf = [0u8; 1024];
6182        rng.fill_bytes(&mut buf);
6183        let mut unstructured = Unstructured::new(&buf);
6184        Self::arbitrary(&mut unstructured).unwrap_or_default()
6185    }
6186}
6187impl Default for AUTOPILOT_VERSION_DATA {
6188    fn default() -> Self {
6189        Self::DEFAULT.clone()
6190    }
6191}
6192impl MessageData for AUTOPILOT_VERSION_DATA {
6193    type Message = MavMessage;
6194    const ID: u32 = 148u32;
6195    const NAME: &'static str = "AUTOPILOT_VERSION";
6196    const EXTRA_CRC: u8 = 178u8;
6197    const ENCODED_LEN: usize = 78usize;
6198    fn deser(
6199        _version: MavlinkVersion,
6200        __input: &[u8],
6201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6202        let avail_len = __input.len();
6203        let mut payload_buf = [0; Self::ENCODED_LEN];
6204        let mut buf = if avail_len < Self::ENCODED_LEN {
6205            payload_buf[0..avail_len].copy_from_slice(__input);
6206            Bytes::new(&payload_buf)
6207        } else {
6208            Bytes::new(__input)
6209        };
6210        let mut __struct = Self::default();
6211        let tmp = buf.get_u64_le();
6212        __struct.capabilities = MavProtocolCapability::from_bits(
6213            tmp & MavProtocolCapability::all().bits(),
6214        )
6215        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6216            flag_type: "MavProtocolCapability",
6217            value: tmp as u32,
6218        })?;
6219        __struct.uid = buf.get_u64_le();
6220        __struct.flight_sw_version = buf.get_u32_le();
6221        __struct.middleware_sw_version = buf.get_u32_le();
6222        __struct.os_sw_version = buf.get_u32_le();
6223        __struct.board_version = buf.get_u32_le();
6224        __struct.vendor_id = buf.get_u16_le();
6225        __struct.product_id = buf.get_u16_le();
6226        for v in &mut __struct.flight_custom_version {
6227            let val = buf.get_u8();
6228            *v = val;
6229        }
6230        for v in &mut __struct.middleware_custom_version {
6231            let val = buf.get_u8();
6232            *v = val;
6233        }
6234        for v in &mut __struct.os_custom_version {
6235            let val = buf.get_u8();
6236            *v = val;
6237        }
6238        for v in &mut __struct.uid2 {
6239            let val = buf.get_u8();
6240            *v = val;
6241        }
6242        Ok(__struct)
6243    }
6244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6245        let mut __tmp = BytesMut::new(bytes);
6246        #[allow(clippy::absurd_extreme_comparisons)]
6247        #[allow(unused_comparisons)]
6248        if __tmp.remaining() < Self::ENCODED_LEN {
6249            panic!(
6250                "buffer is too small (need {} bytes, but got {})",
6251                Self::ENCODED_LEN,
6252                __tmp.remaining(),
6253            )
6254        }
6255        __tmp.put_u64_le(self.capabilities.bits());
6256        __tmp.put_u64_le(self.uid);
6257        __tmp.put_u32_le(self.flight_sw_version);
6258        __tmp.put_u32_le(self.middleware_sw_version);
6259        __tmp.put_u32_le(self.os_sw_version);
6260        __tmp.put_u32_le(self.board_version);
6261        __tmp.put_u16_le(self.vendor_id);
6262        __tmp.put_u16_le(self.product_id);
6263        for val in &self.flight_custom_version {
6264            __tmp.put_u8(*val);
6265        }
6266        for val in &self.middleware_custom_version {
6267            __tmp.put_u8(*val);
6268        }
6269        for val in &self.os_custom_version {
6270            __tmp.put_u8(*val);
6271        }
6272        if matches!(version, MavlinkVersion::V2) {
6273            for val in &self.uid2 {
6274                __tmp.put_u8(*val);
6275            }
6276            let len = __tmp.len();
6277            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6278        } else {
6279            __tmp.len()
6280        }
6281    }
6282}
6283#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6284#[doc = ""]
6285#[doc = "ID: 435"]
6286#[derive(Debug, Clone, PartialEq)]
6287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6289#[cfg_attr(feature = "ts", derive(TS))]
6290#[cfg_attr(feature = "ts", ts(export))]
6291pub struct AVAILABLE_MODES_DATA {
6292    #[doc = "A bitfield for use for autopilot-specific flags"]
6293    pub custom_mode: u32,
6294    #[doc = "Mode properties."]
6295    pub properties: MavModeProperty,
6296    #[doc = "The total number of available modes for the current vehicle type."]
6297    pub number_modes: u8,
6298    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6299    pub mode_index: u8,
6300    #[doc = "Standard mode."]
6301    pub standard_mode: MavStandardMode,
6302    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6303    #[cfg_attr(
6304        feature = "serde",
6305        serde(
6306            serialize_with = "crate::nulstr::serialize::<_, 35>",
6307            deserialize_with = "crate::nulstr::deserialize::<_, 35>"
6308        )
6309    )]
6310    #[cfg_attr(feature = "ts", ts(type = "string"))]
6311    pub mode_name: [u8; 35],
6312}
6313impl AVAILABLE_MODES_DATA {
6314    pub const ENCODED_LEN: usize = 46usize;
6315    pub const DEFAULT: Self = Self {
6316        custom_mode: 0_u32,
6317        properties: MavModeProperty::DEFAULT,
6318        number_modes: 0_u8,
6319        mode_index: 0_u8,
6320        standard_mode: MavStandardMode::DEFAULT,
6321        mode_name: [0_u8; 35usize],
6322    };
6323    #[cfg(feature = "arbitrary")]
6324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6325        use arbitrary::{Arbitrary, Unstructured};
6326        let mut buf = [0u8; 1024];
6327        rng.fill_bytes(&mut buf);
6328        let mut unstructured = Unstructured::new(&buf);
6329        Self::arbitrary(&mut unstructured).unwrap_or_default()
6330    }
6331}
6332impl Default for AVAILABLE_MODES_DATA {
6333    fn default() -> Self {
6334        Self::DEFAULT.clone()
6335    }
6336}
6337impl MessageData for AVAILABLE_MODES_DATA {
6338    type Message = MavMessage;
6339    const ID: u32 = 435u32;
6340    const NAME: &'static str = "AVAILABLE_MODES";
6341    const EXTRA_CRC: u8 = 134u8;
6342    const ENCODED_LEN: usize = 46usize;
6343    fn deser(
6344        _version: MavlinkVersion,
6345        __input: &[u8],
6346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6347        let avail_len = __input.len();
6348        let mut payload_buf = [0; Self::ENCODED_LEN];
6349        let mut buf = if avail_len < Self::ENCODED_LEN {
6350            payload_buf[0..avail_len].copy_from_slice(__input);
6351            Bytes::new(&payload_buf)
6352        } else {
6353            Bytes::new(__input)
6354        };
6355        let mut __struct = Self::default();
6356        __struct.custom_mode = buf.get_u32_le();
6357        let tmp = buf.get_u32_le();
6358        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6359            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6360                flag_type: "MavModeProperty",
6361                value: tmp as u32,
6362            })?;
6363        __struct.number_modes = buf.get_u8();
6364        __struct.mode_index = buf.get_u8();
6365        let tmp = buf.get_u8();
6366        __struct.standard_mode =
6367            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6368                enum_type: "MavStandardMode",
6369                value: tmp as u32,
6370            })?;
6371        for v in &mut __struct.mode_name {
6372            let val = buf.get_u8();
6373            *v = val;
6374        }
6375        Ok(__struct)
6376    }
6377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6378        let mut __tmp = BytesMut::new(bytes);
6379        #[allow(clippy::absurd_extreme_comparisons)]
6380        #[allow(unused_comparisons)]
6381        if __tmp.remaining() < Self::ENCODED_LEN {
6382            panic!(
6383                "buffer is too small (need {} bytes, but got {})",
6384                Self::ENCODED_LEN,
6385                __tmp.remaining(),
6386            )
6387        }
6388        __tmp.put_u32_le(self.custom_mode);
6389        __tmp.put_u32_le(self.properties.bits());
6390        __tmp.put_u8(self.number_modes);
6391        __tmp.put_u8(self.mode_index);
6392        __tmp.put_u8(self.standard_mode as u8);
6393        for val in &self.mode_name {
6394            __tmp.put_u8(*val);
6395        }
6396        if matches!(version, MavlinkVersion::V2) {
6397            let len = __tmp.len();
6398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6399        } else {
6400            __tmp.len()
6401        }
6402    }
6403}
6404#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6405#[doc = ""]
6406#[doc = "ID: 437"]
6407#[derive(Debug, Clone, PartialEq)]
6408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6410#[cfg_attr(feature = "ts", derive(TS))]
6411#[cfg_attr(feature = "ts", ts(export))]
6412pub struct AVAILABLE_MODES_MONITOR_DATA {
6413    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6414    pub seq: u8,
6415}
6416impl AVAILABLE_MODES_MONITOR_DATA {
6417    pub const ENCODED_LEN: usize = 1usize;
6418    pub const DEFAULT: Self = Self { seq: 0_u8 };
6419    #[cfg(feature = "arbitrary")]
6420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6421        use arbitrary::{Arbitrary, Unstructured};
6422        let mut buf = [0u8; 1024];
6423        rng.fill_bytes(&mut buf);
6424        let mut unstructured = Unstructured::new(&buf);
6425        Self::arbitrary(&mut unstructured).unwrap_or_default()
6426    }
6427}
6428impl Default for AVAILABLE_MODES_MONITOR_DATA {
6429    fn default() -> Self {
6430        Self::DEFAULT.clone()
6431    }
6432}
6433impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6434    type Message = MavMessage;
6435    const ID: u32 = 437u32;
6436    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6437    const EXTRA_CRC: u8 = 30u8;
6438    const ENCODED_LEN: usize = 1usize;
6439    fn deser(
6440        _version: MavlinkVersion,
6441        __input: &[u8],
6442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6443        let avail_len = __input.len();
6444        let mut payload_buf = [0; Self::ENCODED_LEN];
6445        let mut buf = if avail_len < Self::ENCODED_LEN {
6446            payload_buf[0..avail_len].copy_from_slice(__input);
6447            Bytes::new(&payload_buf)
6448        } else {
6449            Bytes::new(__input)
6450        };
6451        let mut __struct = Self::default();
6452        __struct.seq = buf.get_u8();
6453        Ok(__struct)
6454    }
6455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6456        let mut __tmp = BytesMut::new(bytes);
6457        #[allow(clippy::absurd_extreme_comparisons)]
6458        #[allow(unused_comparisons)]
6459        if __tmp.remaining() < Self::ENCODED_LEN {
6460            panic!(
6461                "buffer is too small (need {} bytes, but got {})",
6462                Self::ENCODED_LEN,
6463                __tmp.remaining(),
6464            )
6465        }
6466        __tmp.put_u8(self.seq);
6467        if matches!(version, MavlinkVersion::V2) {
6468            let len = __tmp.len();
6469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6470        } else {
6471            __tmp.len()
6472        }
6473    }
6474}
6475#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6476#[doc = ""]
6477#[doc = "ID: 372"]
6478#[derive(Debug, Clone, PartialEq)]
6479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6481#[cfg_attr(feature = "ts", derive(TS))]
6482#[cfg_attr(feature = "ts", ts(export))]
6483pub struct BATTERY_INFO_DATA {
6484    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6485    pub discharge_minimum_voltage: f32,
6486    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6487    pub charging_minimum_voltage: f32,
6488    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6489    pub resting_minimum_voltage: f32,
6490    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6491    pub charging_maximum_voltage: f32,
6492    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6493    pub charging_maximum_current: f32,
6494    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6495    pub nominal_voltage: f32,
6496    #[doc = "Maximum pack discharge current. 0: field not provided."]
6497    pub discharge_maximum_current: f32,
6498    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6499    pub discharge_maximum_burst_current: f32,
6500    #[doc = "Fully charged design capacity. 0: field not provided."]
6501    pub design_capacity: f32,
6502    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6503    pub full_charge_capacity: f32,
6504    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6505    pub cycle_count: u16,
6506    #[doc = "Battery weight. 0: field not provided."]
6507    pub weight: u16,
6508    #[doc = "Battery ID"]
6509    pub id: u8,
6510    #[doc = "Function of the battery."]
6511    pub battery_function: MavBatteryFunction,
6512    #[doc = "Type (chemistry) of the battery."]
6513    pub mavtype: MavBatteryType,
6514    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6515    pub state_of_health: u8,
6516    #[doc = "Number of battery cells in series. 0: field not provided."]
6517    pub cells_in_series: u8,
6518    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6519    #[cfg_attr(
6520        feature = "serde",
6521        serde(
6522            serialize_with = "crate::nulstr::serialize::<_, 9>",
6523            deserialize_with = "crate::nulstr::deserialize::<_, 9>"
6524        )
6525    )]
6526    #[cfg_attr(feature = "ts", ts(type = "string"))]
6527    pub manufacture_date: [u8; 9],
6528    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6529    #[cfg_attr(
6530        feature = "serde",
6531        serde(
6532            serialize_with = "crate::nulstr::serialize::<_, 32>",
6533            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
6534        )
6535    )]
6536    #[cfg_attr(feature = "ts", ts(type = "string"))]
6537    pub serial_number: [u8; 32],
6538    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6539    #[cfg_attr(
6540        feature = "serde",
6541        serde(
6542            serialize_with = "crate::nulstr::serialize::<_, 50>",
6543            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
6544        )
6545    )]
6546    #[cfg_attr(feature = "ts", ts(type = "string"))]
6547    pub name: [u8; 50],
6548}
6549impl BATTERY_INFO_DATA {
6550    pub const ENCODED_LEN: usize = 140usize;
6551    pub const DEFAULT: Self = Self {
6552        discharge_minimum_voltage: 0.0_f32,
6553        charging_minimum_voltage: 0.0_f32,
6554        resting_minimum_voltage: 0.0_f32,
6555        charging_maximum_voltage: 0.0_f32,
6556        charging_maximum_current: 0.0_f32,
6557        nominal_voltage: 0.0_f32,
6558        discharge_maximum_current: 0.0_f32,
6559        discharge_maximum_burst_current: 0.0_f32,
6560        design_capacity: 0.0_f32,
6561        full_charge_capacity: 0.0_f32,
6562        cycle_count: 0_u16,
6563        weight: 0_u16,
6564        id: 0_u8,
6565        battery_function: MavBatteryFunction::DEFAULT,
6566        mavtype: MavBatteryType::DEFAULT,
6567        state_of_health: 0_u8,
6568        cells_in_series: 0_u8,
6569        manufacture_date: [0_u8; 9usize],
6570        serial_number: [0_u8; 32usize],
6571        name: [0_u8; 50usize],
6572    };
6573    #[cfg(feature = "arbitrary")]
6574    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6575        use arbitrary::{Arbitrary, Unstructured};
6576        let mut buf = [0u8; 1024];
6577        rng.fill_bytes(&mut buf);
6578        let mut unstructured = Unstructured::new(&buf);
6579        Self::arbitrary(&mut unstructured).unwrap_or_default()
6580    }
6581}
6582impl Default for BATTERY_INFO_DATA {
6583    fn default() -> Self {
6584        Self::DEFAULT.clone()
6585    }
6586}
6587impl MessageData for BATTERY_INFO_DATA {
6588    type Message = MavMessage;
6589    const ID: u32 = 372u32;
6590    const NAME: &'static str = "BATTERY_INFO";
6591    const EXTRA_CRC: u8 = 26u8;
6592    const ENCODED_LEN: usize = 140usize;
6593    fn deser(
6594        _version: MavlinkVersion,
6595        __input: &[u8],
6596    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6597        let avail_len = __input.len();
6598        let mut payload_buf = [0; Self::ENCODED_LEN];
6599        let mut buf = if avail_len < Self::ENCODED_LEN {
6600            payload_buf[0..avail_len].copy_from_slice(__input);
6601            Bytes::new(&payload_buf)
6602        } else {
6603            Bytes::new(__input)
6604        };
6605        let mut __struct = Self::default();
6606        __struct.discharge_minimum_voltage = buf.get_f32_le();
6607        __struct.charging_minimum_voltage = buf.get_f32_le();
6608        __struct.resting_minimum_voltage = buf.get_f32_le();
6609        __struct.charging_maximum_voltage = buf.get_f32_le();
6610        __struct.charging_maximum_current = buf.get_f32_le();
6611        __struct.nominal_voltage = buf.get_f32_le();
6612        __struct.discharge_maximum_current = buf.get_f32_le();
6613        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6614        __struct.design_capacity = buf.get_f32_le();
6615        __struct.full_charge_capacity = buf.get_f32_le();
6616        __struct.cycle_count = buf.get_u16_le();
6617        __struct.weight = buf.get_u16_le();
6618        __struct.id = buf.get_u8();
6619        let tmp = buf.get_u8();
6620        __struct.battery_function =
6621            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6622                enum_type: "MavBatteryFunction",
6623                value: tmp as u32,
6624            })?;
6625        let tmp = buf.get_u8();
6626        __struct.mavtype =
6627            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6628                enum_type: "MavBatteryType",
6629                value: tmp as u32,
6630            })?;
6631        __struct.state_of_health = buf.get_u8();
6632        __struct.cells_in_series = buf.get_u8();
6633        for v in &mut __struct.manufacture_date {
6634            let val = buf.get_u8();
6635            *v = val;
6636        }
6637        for v in &mut __struct.serial_number {
6638            let val = buf.get_u8();
6639            *v = val;
6640        }
6641        for v in &mut __struct.name {
6642            let val = buf.get_u8();
6643            *v = val;
6644        }
6645        Ok(__struct)
6646    }
6647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6648        let mut __tmp = BytesMut::new(bytes);
6649        #[allow(clippy::absurd_extreme_comparisons)]
6650        #[allow(unused_comparisons)]
6651        if __tmp.remaining() < Self::ENCODED_LEN {
6652            panic!(
6653                "buffer is too small (need {} bytes, but got {})",
6654                Self::ENCODED_LEN,
6655                __tmp.remaining(),
6656            )
6657        }
6658        __tmp.put_f32_le(self.discharge_minimum_voltage);
6659        __tmp.put_f32_le(self.charging_minimum_voltage);
6660        __tmp.put_f32_le(self.resting_minimum_voltage);
6661        __tmp.put_f32_le(self.charging_maximum_voltage);
6662        __tmp.put_f32_le(self.charging_maximum_current);
6663        __tmp.put_f32_le(self.nominal_voltage);
6664        __tmp.put_f32_le(self.discharge_maximum_current);
6665        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6666        __tmp.put_f32_le(self.design_capacity);
6667        __tmp.put_f32_le(self.full_charge_capacity);
6668        __tmp.put_u16_le(self.cycle_count);
6669        __tmp.put_u16_le(self.weight);
6670        __tmp.put_u8(self.id);
6671        __tmp.put_u8(self.battery_function as u8);
6672        __tmp.put_u8(self.mavtype as u8);
6673        __tmp.put_u8(self.state_of_health);
6674        __tmp.put_u8(self.cells_in_series);
6675        for val in &self.manufacture_date {
6676            __tmp.put_u8(*val);
6677        }
6678        for val in &self.serial_number {
6679            __tmp.put_u8(*val);
6680        }
6681        for val in &self.name {
6682            __tmp.put_u8(*val);
6683        }
6684        if matches!(version, MavlinkVersion::V2) {
6685            let len = __tmp.len();
6686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6687        } else {
6688            __tmp.len()
6689        }
6690    }
6691}
6692#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6693#[doc = ""]
6694#[doc = "ID: 147"]
6695#[derive(Debug, Clone, PartialEq)]
6696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6698#[cfg_attr(feature = "ts", derive(TS))]
6699#[cfg_attr(feature = "ts", ts(export))]
6700pub struct BATTERY_STATUS_DATA {
6701    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6702    pub current_consumed: i32,
6703    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6704    pub energy_consumed: i32,
6705    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6706    pub temperature: i16,
6707    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6710    pub voltages: [u16; 10],
6711    #[doc = "Battery current, -1: autopilot does not measure the current"]
6712    pub current_battery: i16,
6713    #[doc = "Battery ID"]
6714    pub id: u8,
6715    #[doc = "Function of the battery"]
6716    pub battery_function: MavBatteryFunction,
6717    #[doc = "Type (chemistry) of the battery"]
6718    pub mavtype: MavBatteryType,
6719    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6720    pub battery_remaining: i8,
6721    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6722    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6723    pub time_remaining: i32,
6724    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6725    #[cfg_attr(feature = "serde", serde(default))]
6726    pub charge_state: MavBatteryChargeState,
6727    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6728    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6730    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6731    pub voltages_ext: [u16; 4],
6732    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6733    #[cfg_attr(feature = "serde", serde(default))]
6734    pub mode: MavBatteryMode,
6735    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6736    #[cfg_attr(feature = "serde", serde(default))]
6737    pub fault_bitmask: MavBatteryFault,
6738}
6739impl BATTERY_STATUS_DATA {
6740    pub const ENCODED_LEN: usize = 54usize;
6741    pub const DEFAULT: Self = Self {
6742        current_consumed: 0_i32,
6743        energy_consumed: 0_i32,
6744        temperature: 0_i16,
6745        voltages: [0_u16; 10usize],
6746        current_battery: 0_i16,
6747        id: 0_u8,
6748        battery_function: MavBatteryFunction::DEFAULT,
6749        mavtype: MavBatteryType::DEFAULT,
6750        battery_remaining: 0_i8,
6751        time_remaining: 0_i32,
6752        charge_state: MavBatteryChargeState::DEFAULT,
6753        voltages_ext: [0_u16; 4usize],
6754        mode: MavBatteryMode::DEFAULT,
6755        fault_bitmask: MavBatteryFault::DEFAULT,
6756    };
6757    #[cfg(feature = "arbitrary")]
6758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6759        use arbitrary::{Arbitrary, Unstructured};
6760        let mut buf = [0u8; 1024];
6761        rng.fill_bytes(&mut buf);
6762        let mut unstructured = Unstructured::new(&buf);
6763        Self::arbitrary(&mut unstructured).unwrap_or_default()
6764    }
6765}
6766impl Default for BATTERY_STATUS_DATA {
6767    fn default() -> Self {
6768        Self::DEFAULT.clone()
6769    }
6770}
6771impl MessageData for BATTERY_STATUS_DATA {
6772    type Message = MavMessage;
6773    const ID: u32 = 147u32;
6774    const NAME: &'static str = "BATTERY_STATUS";
6775    const EXTRA_CRC: u8 = 154u8;
6776    const ENCODED_LEN: usize = 54usize;
6777    fn deser(
6778        _version: MavlinkVersion,
6779        __input: &[u8],
6780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6781        let avail_len = __input.len();
6782        let mut payload_buf = [0; Self::ENCODED_LEN];
6783        let mut buf = if avail_len < Self::ENCODED_LEN {
6784            payload_buf[0..avail_len].copy_from_slice(__input);
6785            Bytes::new(&payload_buf)
6786        } else {
6787            Bytes::new(__input)
6788        };
6789        let mut __struct = Self::default();
6790        __struct.current_consumed = buf.get_i32_le();
6791        __struct.energy_consumed = buf.get_i32_le();
6792        __struct.temperature = buf.get_i16_le();
6793        for v in &mut __struct.voltages {
6794            let val = buf.get_u16_le();
6795            *v = val;
6796        }
6797        __struct.current_battery = buf.get_i16_le();
6798        __struct.id = buf.get_u8();
6799        let tmp = buf.get_u8();
6800        __struct.battery_function =
6801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6802                enum_type: "MavBatteryFunction",
6803                value: tmp as u32,
6804            })?;
6805        let tmp = buf.get_u8();
6806        __struct.mavtype =
6807            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6808                enum_type: "MavBatteryType",
6809                value: tmp as u32,
6810            })?;
6811        __struct.battery_remaining = buf.get_i8();
6812        __struct.time_remaining = buf.get_i32_le();
6813        let tmp = buf.get_u8();
6814        __struct.charge_state =
6815            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6816                enum_type: "MavBatteryChargeState",
6817                value: tmp as u32,
6818            })?;
6819        for v in &mut __struct.voltages_ext {
6820            let val = buf.get_u16_le();
6821            *v = val;
6822        }
6823        let tmp = buf.get_u8();
6824        __struct.mode =
6825            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6826                enum_type: "MavBatteryMode",
6827                value: tmp as u32,
6828            })?;
6829        let tmp = buf.get_u32_le();
6830        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6831            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6832                flag_type: "MavBatteryFault",
6833                value: tmp as u32,
6834            })?;
6835        Ok(__struct)
6836    }
6837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6838        let mut __tmp = BytesMut::new(bytes);
6839        #[allow(clippy::absurd_extreme_comparisons)]
6840        #[allow(unused_comparisons)]
6841        if __tmp.remaining() < Self::ENCODED_LEN {
6842            panic!(
6843                "buffer is too small (need {} bytes, but got {})",
6844                Self::ENCODED_LEN,
6845                __tmp.remaining(),
6846            )
6847        }
6848        __tmp.put_i32_le(self.current_consumed);
6849        __tmp.put_i32_le(self.energy_consumed);
6850        __tmp.put_i16_le(self.temperature);
6851        for val in &self.voltages {
6852            __tmp.put_u16_le(*val);
6853        }
6854        __tmp.put_i16_le(self.current_battery);
6855        __tmp.put_u8(self.id);
6856        __tmp.put_u8(self.battery_function as u8);
6857        __tmp.put_u8(self.mavtype as u8);
6858        __tmp.put_i8(self.battery_remaining);
6859        if matches!(version, MavlinkVersion::V2) {
6860            __tmp.put_i32_le(self.time_remaining);
6861            __tmp.put_u8(self.charge_state as u8);
6862            for val in &self.voltages_ext {
6863                __tmp.put_u16_le(*val);
6864            }
6865            __tmp.put_u8(self.mode as u8);
6866            __tmp.put_u32_le(self.fault_bitmask.bits());
6867            let len = __tmp.len();
6868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6869        } else {
6870            __tmp.len()
6871        }
6872    }
6873}
6874#[doc = "Report button state change."]
6875#[doc = ""]
6876#[doc = "ID: 257"]
6877#[derive(Debug, Clone, PartialEq)]
6878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6880#[cfg_attr(feature = "ts", derive(TS))]
6881#[cfg_attr(feature = "ts", ts(export))]
6882pub struct BUTTON_CHANGE_DATA {
6883    #[doc = "Timestamp (time since system boot)."]
6884    pub time_boot_ms: u32,
6885    #[doc = "Time of last change of button state."]
6886    pub last_change_ms: u32,
6887    #[doc = "Bitmap for state of buttons."]
6888    pub state: u8,
6889}
6890impl BUTTON_CHANGE_DATA {
6891    pub const ENCODED_LEN: usize = 9usize;
6892    pub const DEFAULT: Self = Self {
6893        time_boot_ms: 0_u32,
6894        last_change_ms: 0_u32,
6895        state: 0_u8,
6896    };
6897    #[cfg(feature = "arbitrary")]
6898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6899        use arbitrary::{Arbitrary, Unstructured};
6900        let mut buf = [0u8; 1024];
6901        rng.fill_bytes(&mut buf);
6902        let mut unstructured = Unstructured::new(&buf);
6903        Self::arbitrary(&mut unstructured).unwrap_or_default()
6904    }
6905}
6906impl Default for BUTTON_CHANGE_DATA {
6907    fn default() -> Self {
6908        Self::DEFAULT.clone()
6909    }
6910}
6911impl MessageData for BUTTON_CHANGE_DATA {
6912    type Message = MavMessage;
6913    const ID: u32 = 257u32;
6914    const NAME: &'static str = "BUTTON_CHANGE";
6915    const EXTRA_CRC: u8 = 131u8;
6916    const ENCODED_LEN: usize = 9usize;
6917    fn deser(
6918        _version: MavlinkVersion,
6919        __input: &[u8],
6920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6921        let avail_len = __input.len();
6922        let mut payload_buf = [0; Self::ENCODED_LEN];
6923        let mut buf = if avail_len < Self::ENCODED_LEN {
6924            payload_buf[0..avail_len].copy_from_slice(__input);
6925            Bytes::new(&payload_buf)
6926        } else {
6927            Bytes::new(__input)
6928        };
6929        let mut __struct = Self::default();
6930        __struct.time_boot_ms = buf.get_u32_le();
6931        __struct.last_change_ms = buf.get_u32_le();
6932        __struct.state = buf.get_u8();
6933        Ok(__struct)
6934    }
6935    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6936        let mut __tmp = BytesMut::new(bytes);
6937        #[allow(clippy::absurd_extreme_comparisons)]
6938        #[allow(unused_comparisons)]
6939        if __tmp.remaining() < Self::ENCODED_LEN {
6940            panic!(
6941                "buffer is too small (need {} bytes, but got {})",
6942                Self::ENCODED_LEN,
6943                __tmp.remaining(),
6944            )
6945        }
6946        __tmp.put_u32_le(self.time_boot_ms);
6947        __tmp.put_u32_le(self.last_change_ms);
6948        __tmp.put_u8(self.state);
6949        if matches!(version, MavlinkVersion::V2) {
6950            let len = __tmp.len();
6951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6952        } else {
6953            __tmp.len()
6954        }
6955    }
6956}
6957#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6958#[doc = ""]
6959#[doc = "ID: 262"]
6960#[derive(Debug, Clone, PartialEq)]
6961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6963#[cfg_attr(feature = "ts", derive(TS))]
6964#[cfg_attr(feature = "ts", ts(export))]
6965pub struct CAMERA_CAPTURE_STATUS_DATA {
6966    #[doc = "Timestamp (time since system boot)."]
6967    pub time_boot_ms: u32,
6968    #[doc = "Image capture interval"]
6969    pub image_interval: f32,
6970    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6971    pub recording_time_ms: u32,
6972    #[doc = "Available storage capacity."]
6973    pub available_capacity: f32,
6974    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6975    pub image_status: u8,
6976    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6977    pub video_status: u8,
6978    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6980    pub image_count: i32,
6981    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6983    pub camera_device_id: u8,
6984}
6985impl CAMERA_CAPTURE_STATUS_DATA {
6986    pub const ENCODED_LEN: usize = 23usize;
6987    pub const DEFAULT: Self = Self {
6988        time_boot_ms: 0_u32,
6989        image_interval: 0.0_f32,
6990        recording_time_ms: 0_u32,
6991        available_capacity: 0.0_f32,
6992        image_status: 0_u8,
6993        video_status: 0_u8,
6994        image_count: 0_i32,
6995        camera_device_id: 0_u8,
6996    };
6997    #[cfg(feature = "arbitrary")]
6998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6999        use arbitrary::{Arbitrary, Unstructured};
7000        let mut buf = [0u8; 1024];
7001        rng.fill_bytes(&mut buf);
7002        let mut unstructured = Unstructured::new(&buf);
7003        Self::arbitrary(&mut unstructured).unwrap_or_default()
7004    }
7005}
7006impl Default for CAMERA_CAPTURE_STATUS_DATA {
7007    fn default() -> Self {
7008        Self::DEFAULT.clone()
7009    }
7010}
7011impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7012    type Message = MavMessage;
7013    const ID: u32 = 262u32;
7014    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7015    const EXTRA_CRC: u8 = 12u8;
7016    const ENCODED_LEN: usize = 23usize;
7017    fn deser(
7018        _version: MavlinkVersion,
7019        __input: &[u8],
7020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7021        let avail_len = __input.len();
7022        let mut payload_buf = [0; Self::ENCODED_LEN];
7023        let mut buf = if avail_len < Self::ENCODED_LEN {
7024            payload_buf[0..avail_len].copy_from_slice(__input);
7025            Bytes::new(&payload_buf)
7026        } else {
7027            Bytes::new(__input)
7028        };
7029        let mut __struct = Self::default();
7030        __struct.time_boot_ms = buf.get_u32_le();
7031        __struct.image_interval = buf.get_f32_le();
7032        __struct.recording_time_ms = buf.get_u32_le();
7033        __struct.available_capacity = buf.get_f32_le();
7034        __struct.image_status = buf.get_u8();
7035        __struct.video_status = buf.get_u8();
7036        __struct.image_count = buf.get_i32_le();
7037        __struct.camera_device_id = buf.get_u8();
7038        Ok(__struct)
7039    }
7040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7041        let mut __tmp = BytesMut::new(bytes);
7042        #[allow(clippy::absurd_extreme_comparisons)]
7043        #[allow(unused_comparisons)]
7044        if __tmp.remaining() < Self::ENCODED_LEN {
7045            panic!(
7046                "buffer is too small (need {} bytes, but got {})",
7047                Self::ENCODED_LEN,
7048                __tmp.remaining(),
7049            )
7050        }
7051        __tmp.put_u32_le(self.time_boot_ms);
7052        __tmp.put_f32_le(self.image_interval);
7053        __tmp.put_u32_le(self.recording_time_ms);
7054        __tmp.put_f32_le(self.available_capacity);
7055        __tmp.put_u8(self.image_status);
7056        __tmp.put_u8(self.video_status);
7057        if matches!(version, MavlinkVersion::V2) {
7058            __tmp.put_i32_le(self.image_count);
7059            __tmp.put_u8(self.camera_device_id);
7060            let len = __tmp.len();
7061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7062        } else {
7063            __tmp.len()
7064        }
7065    }
7066}
7067#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7068#[doc = ""]
7069#[doc = "ID: 271"]
7070#[derive(Debug, Clone, PartialEq)]
7071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7073#[cfg_attr(feature = "ts", derive(TS))]
7074#[cfg_attr(feature = "ts", ts(export))]
7075pub struct CAMERA_FOV_STATUS_DATA {
7076    #[doc = "Timestamp (time since system boot)."]
7077    pub time_boot_ms: u32,
7078    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7079    pub lat_camera: i32,
7080    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7081    pub lon_camera: i32,
7082    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7083    pub alt_camera: i32,
7084    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7085    pub lat_image: i32,
7086    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7087    pub lon_image: i32,
7088    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7089    pub alt_image: i32,
7090    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7092    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7093    pub q: [f32; 4],
7094    #[doc = "Horizontal field of view (NaN if unknown)."]
7095    pub hfov: f32,
7096    #[doc = "Vertical field of view (NaN if unknown)."]
7097    pub vfov: f32,
7098    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7099    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7100    pub camera_device_id: u8,
7101}
7102impl CAMERA_FOV_STATUS_DATA {
7103    pub const ENCODED_LEN: usize = 53usize;
7104    pub const DEFAULT: Self = Self {
7105        time_boot_ms: 0_u32,
7106        lat_camera: 0_i32,
7107        lon_camera: 0_i32,
7108        alt_camera: 0_i32,
7109        lat_image: 0_i32,
7110        lon_image: 0_i32,
7111        alt_image: 0_i32,
7112        q: [0.0_f32; 4usize],
7113        hfov: 0.0_f32,
7114        vfov: 0.0_f32,
7115        camera_device_id: 0_u8,
7116    };
7117    #[cfg(feature = "arbitrary")]
7118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7119        use arbitrary::{Arbitrary, Unstructured};
7120        let mut buf = [0u8; 1024];
7121        rng.fill_bytes(&mut buf);
7122        let mut unstructured = Unstructured::new(&buf);
7123        Self::arbitrary(&mut unstructured).unwrap_or_default()
7124    }
7125}
7126impl Default for CAMERA_FOV_STATUS_DATA {
7127    fn default() -> Self {
7128        Self::DEFAULT.clone()
7129    }
7130}
7131impl MessageData for CAMERA_FOV_STATUS_DATA {
7132    type Message = MavMessage;
7133    const ID: u32 = 271u32;
7134    const NAME: &'static str = "CAMERA_FOV_STATUS";
7135    const EXTRA_CRC: u8 = 22u8;
7136    const ENCODED_LEN: usize = 53usize;
7137    fn deser(
7138        _version: MavlinkVersion,
7139        __input: &[u8],
7140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7141        let avail_len = __input.len();
7142        let mut payload_buf = [0; Self::ENCODED_LEN];
7143        let mut buf = if avail_len < Self::ENCODED_LEN {
7144            payload_buf[0..avail_len].copy_from_slice(__input);
7145            Bytes::new(&payload_buf)
7146        } else {
7147            Bytes::new(__input)
7148        };
7149        let mut __struct = Self::default();
7150        __struct.time_boot_ms = buf.get_u32_le();
7151        __struct.lat_camera = buf.get_i32_le();
7152        __struct.lon_camera = buf.get_i32_le();
7153        __struct.alt_camera = buf.get_i32_le();
7154        __struct.lat_image = buf.get_i32_le();
7155        __struct.lon_image = buf.get_i32_le();
7156        __struct.alt_image = buf.get_i32_le();
7157        for v in &mut __struct.q {
7158            let val = buf.get_f32_le();
7159            *v = val;
7160        }
7161        __struct.hfov = buf.get_f32_le();
7162        __struct.vfov = buf.get_f32_le();
7163        __struct.camera_device_id = buf.get_u8();
7164        Ok(__struct)
7165    }
7166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7167        let mut __tmp = BytesMut::new(bytes);
7168        #[allow(clippy::absurd_extreme_comparisons)]
7169        #[allow(unused_comparisons)]
7170        if __tmp.remaining() < Self::ENCODED_LEN {
7171            panic!(
7172                "buffer is too small (need {} bytes, but got {})",
7173                Self::ENCODED_LEN,
7174                __tmp.remaining(),
7175            )
7176        }
7177        __tmp.put_u32_le(self.time_boot_ms);
7178        __tmp.put_i32_le(self.lat_camera);
7179        __tmp.put_i32_le(self.lon_camera);
7180        __tmp.put_i32_le(self.alt_camera);
7181        __tmp.put_i32_le(self.lat_image);
7182        __tmp.put_i32_le(self.lon_image);
7183        __tmp.put_i32_le(self.alt_image);
7184        for val in &self.q {
7185            __tmp.put_f32_le(*val);
7186        }
7187        __tmp.put_f32_le(self.hfov);
7188        __tmp.put_f32_le(self.vfov);
7189        if matches!(version, MavlinkVersion::V2) {
7190            __tmp.put_u8(self.camera_device_id);
7191            let len = __tmp.len();
7192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7193        } else {
7194            __tmp.len()
7195        }
7196    }
7197}
7198#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7199#[doc = ""]
7200#[doc = "ID: 263"]
7201#[derive(Debug, Clone, PartialEq)]
7202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7204#[cfg_attr(feature = "ts", derive(TS))]
7205#[cfg_attr(feature = "ts", ts(export))]
7206pub struct CAMERA_IMAGE_CAPTURED_DATA {
7207    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7208    pub time_utc: u64,
7209    #[doc = "Timestamp (time since system boot)."]
7210    pub time_boot_ms: u32,
7211    #[doc = "Latitude where image was taken"]
7212    pub lat: i32,
7213    #[doc = "Longitude where capture was taken"]
7214    pub lon: i32,
7215    #[doc = "Altitude (MSL) where image was taken"]
7216    pub alt: i32,
7217    #[doc = "Altitude above ground"]
7218    pub relative_alt: i32,
7219    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7221    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7222    pub q: [f32; 4],
7223    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7224    pub image_index: i32,
7225    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7226    pub camera_id: u8,
7227    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7228    pub capture_result: i8,
7229    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7230    #[cfg_attr(
7231        feature = "serde",
7232        serde(
7233            serialize_with = "crate::nulstr::serialize::<_, 205>",
7234            deserialize_with = "crate::nulstr::deserialize::<_, 205>"
7235        )
7236    )]
7237    #[cfg_attr(feature = "ts", ts(type = "string"))]
7238    pub file_url: [u8; 205],
7239}
7240impl CAMERA_IMAGE_CAPTURED_DATA {
7241    pub const ENCODED_LEN: usize = 255usize;
7242    pub const DEFAULT: Self = Self {
7243        time_utc: 0_u64,
7244        time_boot_ms: 0_u32,
7245        lat: 0_i32,
7246        lon: 0_i32,
7247        alt: 0_i32,
7248        relative_alt: 0_i32,
7249        q: [0.0_f32; 4usize],
7250        image_index: 0_i32,
7251        camera_id: 0_u8,
7252        capture_result: 0_i8,
7253        file_url: [0_u8; 205usize],
7254    };
7255    #[cfg(feature = "arbitrary")]
7256    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7257        use arbitrary::{Arbitrary, Unstructured};
7258        let mut buf = [0u8; 1024];
7259        rng.fill_bytes(&mut buf);
7260        let mut unstructured = Unstructured::new(&buf);
7261        Self::arbitrary(&mut unstructured).unwrap_or_default()
7262    }
7263}
7264impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7265    fn default() -> Self {
7266        Self::DEFAULT.clone()
7267    }
7268}
7269impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7270    type Message = MavMessage;
7271    const ID: u32 = 263u32;
7272    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7273    const EXTRA_CRC: u8 = 133u8;
7274    const ENCODED_LEN: usize = 255usize;
7275    fn deser(
7276        _version: MavlinkVersion,
7277        __input: &[u8],
7278    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7279        let avail_len = __input.len();
7280        let mut payload_buf = [0; Self::ENCODED_LEN];
7281        let mut buf = if avail_len < Self::ENCODED_LEN {
7282            payload_buf[0..avail_len].copy_from_slice(__input);
7283            Bytes::new(&payload_buf)
7284        } else {
7285            Bytes::new(__input)
7286        };
7287        let mut __struct = Self::default();
7288        __struct.time_utc = buf.get_u64_le();
7289        __struct.time_boot_ms = buf.get_u32_le();
7290        __struct.lat = buf.get_i32_le();
7291        __struct.lon = buf.get_i32_le();
7292        __struct.alt = buf.get_i32_le();
7293        __struct.relative_alt = buf.get_i32_le();
7294        for v in &mut __struct.q {
7295            let val = buf.get_f32_le();
7296            *v = val;
7297        }
7298        __struct.image_index = buf.get_i32_le();
7299        __struct.camera_id = buf.get_u8();
7300        __struct.capture_result = buf.get_i8();
7301        for v in &mut __struct.file_url {
7302            let val = buf.get_u8();
7303            *v = val;
7304        }
7305        Ok(__struct)
7306    }
7307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7308        let mut __tmp = BytesMut::new(bytes);
7309        #[allow(clippy::absurd_extreme_comparisons)]
7310        #[allow(unused_comparisons)]
7311        if __tmp.remaining() < Self::ENCODED_LEN {
7312            panic!(
7313                "buffer is too small (need {} bytes, but got {})",
7314                Self::ENCODED_LEN,
7315                __tmp.remaining(),
7316            )
7317        }
7318        __tmp.put_u64_le(self.time_utc);
7319        __tmp.put_u32_le(self.time_boot_ms);
7320        __tmp.put_i32_le(self.lat);
7321        __tmp.put_i32_le(self.lon);
7322        __tmp.put_i32_le(self.alt);
7323        __tmp.put_i32_le(self.relative_alt);
7324        for val in &self.q {
7325            __tmp.put_f32_le(*val);
7326        }
7327        __tmp.put_i32_le(self.image_index);
7328        __tmp.put_u8(self.camera_id);
7329        __tmp.put_i8(self.capture_result);
7330        for val in &self.file_url {
7331            __tmp.put_u8(*val);
7332        }
7333        if matches!(version, MavlinkVersion::V2) {
7334            let len = __tmp.len();
7335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7336        } else {
7337            __tmp.len()
7338        }
7339    }
7340}
7341#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7342#[doc = ""]
7343#[doc = "ID: 259"]
7344#[derive(Debug, Clone, PartialEq)]
7345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7347#[cfg_attr(feature = "ts", derive(TS))]
7348#[cfg_attr(feature = "ts", ts(export))]
7349pub struct CAMERA_INFORMATION_DATA {
7350    #[doc = "Timestamp (time since system boot)."]
7351    pub time_boot_ms: u32,
7352    #[doc = "0xff). Use 0 if not known."]
7353    pub firmware_version: u32,
7354    #[doc = "Focal length. Use NaN if not known."]
7355    pub focal_length: f32,
7356    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7357    pub sensor_size_h: f32,
7358    #[doc = "Image sensor size vertical. Use NaN if not known."]
7359    pub sensor_size_v: f32,
7360    #[doc = "Bitmap of camera capability flags."]
7361    pub flags: CameraCapFlags,
7362    #[doc = "Horizontal image resolution. Use 0 if not known."]
7363    pub resolution_h: u16,
7364    #[doc = "Vertical image resolution. Use 0 if not known."]
7365    pub resolution_v: u16,
7366    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7367    pub cam_definition_version: u16,
7368    #[doc = "Name of the camera vendor"]
7369    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7370    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7371    pub vendor_name: [u8; 32],
7372    #[doc = "Name of the camera model"]
7373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7374    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7375    pub model_name: [u8; 32],
7376    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7377    pub lens_id: u8,
7378    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7379    #[cfg_attr(
7380        feature = "serde",
7381        serde(
7382            serialize_with = "crate::nulstr::serialize::<_, 140>",
7383            deserialize_with = "crate::nulstr::deserialize::<_, 140>"
7384        )
7385    )]
7386    #[cfg_attr(feature = "ts", ts(type = "string"))]
7387    pub cam_definition_uri: [u8; 140],
7388    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7389    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7390    pub gimbal_device_id: u8,
7391    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7392    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7393    pub camera_device_id: u8,
7394}
7395impl CAMERA_INFORMATION_DATA {
7396    pub const ENCODED_LEN: usize = 237usize;
7397    pub const DEFAULT: Self = Self {
7398        time_boot_ms: 0_u32,
7399        firmware_version: 0_u32,
7400        focal_length: 0.0_f32,
7401        sensor_size_h: 0.0_f32,
7402        sensor_size_v: 0.0_f32,
7403        flags: CameraCapFlags::DEFAULT,
7404        resolution_h: 0_u16,
7405        resolution_v: 0_u16,
7406        cam_definition_version: 0_u16,
7407        vendor_name: [0_u8; 32usize],
7408        model_name: [0_u8; 32usize],
7409        lens_id: 0_u8,
7410        cam_definition_uri: [0_u8; 140usize],
7411        gimbal_device_id: 0_u8,
7412        camera_device_id: 0_u8,
7413    };
7414    #[cfg(feature = "arbitrary")]
7415    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7416        use arbitrary::{Arbitrary, Unstructured};
7417        let mut buf = [0u8; 1024];
7418        rng.fill_bytes(&mut buf);
7419        let mut unstructured = Unstructured::new(&buf);
7420        Self::arbitrary(&mut unstructured).unwrap_or_default()
7421    }
7422}
7423impl Default for CAMERA_INFORMATION_DATA {
7424    fn default() -> Self {
7425        Self::DEFAULT.clone()
7426    }
7427}
7428impl MessageData for CAMERA_INFORMATION_DATA {
7429    type Message = MavMessage;
7430    const ID: u32 = 259u32;
7431    const NAME: &'static str = "CAMERA_INFORMATION";
7432    const EXTRA_CRC: u8 = 92u8;
7433    const ENCODED_LEN: usize = 237usize;
7434    fn deser(
7435        _version: MavlinkVersion,
7436        __input: &[u8],
7437    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7438        let avail_len = __input.len();
7439        let mut payload_buf = [0; Self::ENCODED_LEN];
7440        let mut buf = if avail_len < Self::ENCODED_LEN {
7441            payload_buf[0..avail_len].copy_from_slice(__input);
7442            Bytes::new(&payload_buf)
7443        } else {
7444            Bytes::new(__input)
7445        };
7446        let mut __struct = Self::default();
7447        __struct.time_boot_ms = buf.get_u32_le();
7448        __struct.firmware_version = buf.get_u32_le();
7449        __struct.focal_length = buf.get_f32_le();
7450        __struct.sensor_size_h = buf.get_f32_le();
7451        __struct.sensor_size_v = buf.get_f32_le();
7452        let tmp = buf.get_u32_le();
7453        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7454            ::mavlink_core::error::ParserError::InvalidFlag {
7455                flag_type: "CameraCapFlags",
7456                value: tmp as u32,
7457            },
7458        )?;
7459        __struct.resolution_h = buf.get_u16_le();
7460        __struct.resolution_v = buf.get_u16_le();
7461        __struct.cam_definition_version = buf.get_u16_le();
7462        for v in &mut __struct.vendor_name {
7463            let val = buf.get_u8();
7464            *v = val;
7465        }
7466        for v in &mut __struct.model_name {
7467            let val = buf.get_u8();
7468            *v = val;
7469        }
7470        __struct.lens_id = buf.get_u8();
7471        for v in &mut __struct.cam_definition_uri {
7472            let val = buf.get_u8();
7473            *v = val;
7474        }
7475        __struct.gimbal_device_id = buf.get_u8();
7476        __struct.camera_device_id = buf.get_u8();
7477        Ok(__struct)
7478    }
7479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7480        let mut __tmp = BytesMut::new(bytes);
7481        #[allow(clippy::absurd_extreme_comparisons)]
7482        #[allow(unused_comparisons)]
7483        if __tmp.remaining() < Self::ENCODED_LEN {
7484            panic!(
7485                "buffer is too small (need {} bytes, but got {})",
7486                Self::ENCODED_LEN,
7487                __tmp.remaining(),
7488            )
7489        }
7490        __tmp.put_u32_le(self.time_boot_ms);
7491        __tmp.put_u32_le(self.firmware_version);
7492        __tmp.put_f32_le(self.focal_length);
7493        __tmp.put_f32_le(self.sensor_size_h);
7494        __tmp.put_f32_le(self.sensor_size_v);
7495        __tmp.put_u32_le(self.flags.bits());
7496        __tmp.put_u16_le(self.resolution_h);
7497        __tmp.put_u16_le(self.resolution_v);
7498        __tmp.put_u16_le(self.cam_definition_version);
7499        for val in &self.vendor_name {
7500            __tmp.put_u8(*val);
7501        }
7502        for val in &self.model_name {
7503            __tmp.put_u8(*val);
7504        }
7505        __tmp.put_u8(self.lens_id);
7506        for val in &self.cam_definition_uri {
7507            __tmp.put_u8(*val);
7508        }
7509        if matches!(version, MavlinkVersion::V2) {
7510            __tmp.put_u8(self.gimbal_device_id);
7511            __tmp.put_u8(self.camera_device_id);
7512            let len = __tmp.len();
7513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7514        } else {
7515            __tmp.len()
7516        }
7517    }
7518}
7519#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7520#[doc = ""]
7521#[doc = "ID: 260"]
7522#[derive(Debug, Clone, PartialEq)]
7523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7525#[cfg_attr(feature = "ts", derive(TS))]
7526#[cfg_attr(feature = "ts", ts(export))]
7527pub struct CAMERA_SETTINGS_DATA {
7528    #[doc = "Timestamp (time since system boot)."]
7529    pub time_boot_ms: u32,
7530    #[doc = "Camera mode"]
7531    pub mode_id: CameraMode,
7532    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7534    pub zoomLevel: f32,
7535    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7537    pub focusLevel: f32,
7538    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7540    pub camera_device_id: u8,
7541}
7542impl CAMERA_SETTINGS_DATA {
7543    pub const ENCODED_LEN: usize = 14usize;
7544    pub const DEFAULT: Self = Self {
7545        time_boot_ms: 0_u32,
7546        mode_id: CameraMode::DEFAULT,
7547        zoomLevel: 0.0_f32,
7548        focusLevel: 0.0_f32,
7549        camera_device_id: 0_u8,
7550    };
7551    #[cfg(feature = "arbitrary")]
7552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7553        use arbitrary::{Arbitrary, Unstructured};
7554        let mut buf = [0u8; 1024];
7555        rng.fill_bytes(&mut buf);
7556        let mut unstructured = Unstructured::new(&buf);
7557        Self::arbitrary(&mut unstructured).unwrap_or_default()
7558    }
7559}
7560impl Default for CAMERA_SETTINGS_DATA {
7561    fn default() -> Self {
7562        Self::DEFAULT.clone()
7563    }
7564}
7565impl MessageData for CAMERA_SETTINGS_DATA {
7566    type Message = MavMessage;
7567    const ID: u32 = 260u32;
7568    const NAME: &'static str = "CAMERA_SETTINGS";
7569    const EXTRA_CRC: u8 = 146u8;
7570    const ENCODED_LEN: usize = 14usize;
7571    fn deser(
7572        _version: MavlinkVersion,
7573        __input: &[u8],
7574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7575        let avail_len = __input.len();
7576        let mut payload_buf = [0; Self::ENCODED_LEN];
7577        let mut buf = if avail_len < Self::ENCODED_LEN {
7578            payload_buf[0..avail_len].copy_from_slice(__input);
7579            Bytes::new(&payload_buf)
7580        } else {
7581            Bytes::new(__input)
7582        };
7583        let mut __struct = Self::default();
7584        __struct.time_boot_ms = buf.get_u32_le();
7585        let tmp = buf.get_u8();
7586        __struct.mode_id =
7587            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7588                enum_type: "CameraMode",
7589                value: tmp as u32,
7590            })?;
7591        __struct.zoomLevel = buf.get_f32_le();
7592        __struct.focusLevel = buf.get_f32_le();
7593        __struct.camera_device_id = buf.get_u8();
7594        Ok(__struct)
7595    }
7596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7597        let mut __tmp = BytesMut::new(bytes);
7598        #[allow(clippy::absurd_extreme_comparisons)]
7599        #[allow(unused_comparisons)]
7600        if __tmp.remaining() < Self::ENCODED_LEN {
7601            panic!(
7602                "buffer is too small (need {} bytes, but got {})",
7603                Self::ENCODED_LEN,
7604                __tmp.remaining(),
7605            )
7606        }
7607        __tmp.put_u32_le(self.time_boot_ms);
7608        __tmp.put_u8(self.mode_id as u8);
7609        if matches!(version, MavlinkVersion::V2) {
7610            __tmp.put_f32_le(self.zoomLevel);
7611            __tmp.put_f32_le(self.focusLevel);
7612            __tmp.put_u8(self.camera_device_id);
7613            let len = __tmp.len();
7614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7615        } else {
7616            __tmp.len()
7617        }
7618    }
7619}
7620#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7621#[doc = ""]
7622#[doc = "ID: 277"]
7623#[derive(Debug, Clone, PartialEq)]
7624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7626#[cfg_attr(feature = "ts", derive(TS))]
7627#[cfg_attr(feature = "ts", ts(export))]
7628pub struct CAMERA_THERMAL_RANGE_DATA {
7629    #[doc = "Timestamp (time since system boot)."]
7630    pub time_boot_ms: u32,
7631    #[doc = "Temperature max."]
7632    pub max: f32,
7633    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7634    pub max_point_x: f32,
7635    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7636    pub max_point_y: f32,
7637    #[doc = "Temperature min."]
7638    pub min: f32,
7639    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7640    pub min_point_x: f32,
7641    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7642    pub min_point_y: f32,
7643    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7644    pub stream_id: u8,
7645    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7646    pub camera_device_id: u8,
7647}
7648impl CAMERA_THERMAL_RANGE_DATA {
7649    pub const ENCODED_LEN: usize = 30usize;
7650    pub const DEFAULT: Self = Self {
7651        time_boot_ms: 0_u32,
7652        max: 0.0_f32,
7653        max_point_x: 0.0_f32,
7654        max_point_y: 0.0_f32,
7655        min: 0.0_f32,
7656        min_point_x: 0.0_f32,
7657        min_point_y: 0.0_f32,
7658        stream_id: 0_u8,
7659        camera_device_id: 0_u8,
7660    };
7661    #[cfg(feature = "arbitrary")]
7662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7663        use arbitrary::{Arbitrary, Unstructured};
7664        let mut buf = [0u8; 1024];
7665        rng.fill_bytes(&mut buf);
7666        let mut unstructured = Unstructured::new(&buf);
7667        Self::arbitrary(&mut unstructured).unwrap_or_default()
7668    }
7669}
7670impl Default for CAMERA_THERMAL_RANGE_DATA {
7671    fn default() -> Self {
7672        Self::DEFAULT.clone()
7673    }
7674}
7675impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7676    type Message = MavMessage;
7677    const ID: u32 = 277u32;
7678    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7679    const EXTRA_CRC: u8 = 62u8;
7680    const ENCODED_LEN: usize = 30usize;
7681    fn deser(
7682        _version: MavlinkVersion,
7683        __input: &[u8],
7684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7685        let avail_len = __input.len();
7686        let mut payload_buf = [0; Self::ENCODED_LEN];
7687        let mut buf = if avail_len < Self::ENCODED_LEN {
7688            payload_buf[0..avail_len].copy_from_slice(__input);
7689            Bytes::new(&payload_buf)
7690        } else {
7691            Bytes::new(__input)
7692        };
7693        let mut __struct = Self::default();
7694        __struct.time_boot_ms = buf.get_u32_le();
7695        __struct.max = buf.get_f32_le();
7696        __struct.max_point_x = buf.get_f32_le();
7697        __struct.max_point_y = buf.get_f32_le();
7698        __struct.min = buf.get_f32_le();
7699        __struct.min_point_x = buf.get_f32_le();
7700        __struct.min_point_y = buf.get_f32_le();
7701        __struct.stream_id = buf.get_u8();
7702        __struct.camera_device_id = buf.get_u8();
7703        Ok(__struct)
7704    }
7705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7706        let mut __tmp = BytesMut::new(bytes);
7707        #[allow(clippy::absurd_extreme_comparisons)]
7708        #[allow(unused_comparisons)]
7709        if __tmp.remaining() < Self::ENCODED_LEN {
7710            panic!(
7711                "buffer is too small (need {} bytes, but got {})",
7712                Self::ENCODED_LEN,
7713                __tmp.remaining(),
7714            )
7715        }
7716        __tmp.put_u32_le(self.time_boot_ms);
7717        __tmp.put_f32_le(self.max);
7718        __tmp.put_f32_le(self.max_point_x);
7719        __tmp.put_f32_le(self.max_point_y);
7720        __tmp.put_f32_le(self.min);
7721        __tmp.put_f32_le(self.min_point_x);
7722        __tmp.put_f32_le(self.min_point_y);
7723        __tmp.put_u8(self.stream_id);
7724        __tmp.put_u8(self.camera_device_id);
7725        if matches!(version, MavlinkVersion::V2) {
7726            let len = __tmp.len();
7727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7728        } else {
7729            __tmp.len()
7730        }
7731    }
7732}
7733#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7734#[doc = ""]
7735#[doc = "ID: 276"]
7736#[derive(Debug, Clone, PartialEq)]
7737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7739#[cfg_attr(feature = "ts", derive(TS))]
7740#[cfg_attr(feature = "ts", ts(export))]
7741pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7742    #[doc = "Latitude of tracked object"]
7743    pub lat: i32,
7744    #[doc = "Longitude of tracked object"]
7745    pub lon: i32,
7746    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7747    pub alt: f32,
7748    #[doc = "Horizontal accuracy. NAN if unknown"]
7749    pub h_acc: f32,
7750    #[doc = "Vertical accuracy. NAN if unknown"]
7751    pub v_acc: f32,
7752    #[doc = "North velocity of tracked object. NAN if unknown"]
7753    pub vel_n: f32,
7754    #[doc = "East velocity of tracked object. NAN if unknown"]
7755    pub vel_e: f32,
7756    #[doc = "Down velocity of tracked object. NAN if unknown"]
7757    pub vel_d: f32,
7758    #[doc = "Velocity accuracy. NAN if unknown"]
7759    pub vel_acc: f32,
7760    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7761    pub dist: f32,
7762    #[doc = "Heading in radians, in NED. NAN if unknown"]
7763    pub hdg: f32,
7764    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7765    pub hdg_acc: f32,
7766    #[doc = "Current tracking status"]
7767    pub tracking_status: CameraTrackingStatusFlags,
7768    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7769    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7770    pub camera_device_id: u8,
7771}
7772impl CAMERA_TRACKING_GEO_STATUS_DATA {
7773    pub const ENCODED_LEN: usize = 50usize;
7774    pub const DEFAULT: Self = Self {
7775        lat: 0_i32,
7776        lon: 0_i32,
7777        alt: 0.0_f32,
7778        h_acc: 0.0_f32,
7779        v_acc: 0.0_f32,
7780        vel_n: 0.0_f32,
7781        vel_e: 0.0_f32,
7782        vel_d: 0.0_f32,
7783        vel_acc: 0.0_f32,
7784        dist: 0.0_f32,
7785        hdg: 0.0_f32,
7786        hdg_acc: 0.0_f32,
7787        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7788        camera_device_id: 0_u8,
7789    };
7790    #[cfg(feature = "arbitrary")]
7791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7792        use arbitrary::{Arbitrary, Unstructured};
7793        let mut buf = [0u8; 1024];
7794        rng.fill_bytes(&mut buf);
7795        let mut unstructured = Unstructured::new(&buf);
7796        Self::arbitrary(&mut unstructured).unwrap_or_default()
7797    }
7798}
7799impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7800    fn default() -> Self {
7801        Self::DEFAULT.clone()
7802    }
7803}
7804impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7805    type Message = MavMessage;
7806    const ID: u32 = 276u32;
7807    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7808    const EXTRA_CRC: u8 = 18u8;
7809    const ENCODED_LEN: usize = 50usize;
7810    fn deser(
7811        _version: MavlinkVersion,
7812        __input: &[u8],
7813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7814        let avail_len = __input.len();
7815        let mut payload_buf = [0; Self::ENCODED_LEN];
7816        let mut buf = if avail_len < Self::ENCODED_LEN {
7817            payload_buf[0..avail_len].copy_from_slice(__input);
7818            Bytes::new(&payload_buf)
7819        } else {
7820            Bytes::new(__input)
7821        };
7822        let mut __struct = Self::default();
7823        __struct.lat = buf.get_i32_le();
7824        __struct.lon = buf.get_i32_le();
7825        __struct.alt = buf.get_f32_le();
7826        __struct.h_acc = buf.get_f32_le();
7827        __struct.v_acc = buf.get_f32_le();
7828        __struct.vel_n = buf.get_f32_le();
7829        __struct.vel_e = buf.get_f32_le();
7830        __struct.vel_d = buf.get_f32_le();
7831        __struct.vel_acc = buf.get_f32_le();
7832        __struct.dist = buf.get_f32_le();
7833        __struct.hdg = buf.get_f32_le();
7834        __struct.hdg_acc = buf.get_f32_le();
7835        let tmp = buf.get_u8();
7836        __struct.tracking_status =
7837            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7838                enum_type: "CameraTrackingStatusFlags",
7839                value: tmp as u32,
7840            })?;
7841        __struct.camera_device_id = buf.get_u8();
7842        Ok(__struct)
7843    }
7844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7845        let mut __tmp = BytesMut::new(bytes);
7846        #[allow(clippy::absurd_extreme_comparisons)]
7847        #[allow(unused_comparisons)]
7848        if __tmp.remaining() < Self::ENCODED_LEN {
7849            panic!(
7850                "buffer is too small (need {} bytes, but got {})",
7851                Self::ENCODED_LEN,
7852                __tmp.remaining(),
7853            )
7854        }
7855        __tmp.put_i32_le(self.lat);
7856        __tmp.put_i32_le(self.lon);
7857        __tmp.put_f32_le(self.alt);
7858        __tmp.put_f32_le(self.h_acc);
7859        __tmp.put_f32_le(self.v_acc);
7860        __tmp.put_f32_le(self.vel_n);
7861        __tmp.put_f32_le(self.vel_e);
7862        __tmp.put_f32_le(self.vel_d);
7863        __tmp.put_f32_le(self.vel_acc);
7864        __tmp.put_f32_le(self.dist);
7865        __tmp.put_f32_le(self.hdg);
7866        __tmp.put_f32_le(self.hdg_acc);
7867        __tmp.put_u8(self.tracking_status as u8);
7868        if matches!(version, MavlinkVersion::V2) {
7869            __tmp.put_u8(self.camera_device_id);
7870            let len = __tmp.len();
7871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7872        } else {
7873            __tmp.len()
7874        }
7875    }
7876}
7877#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7878#[doc = ""]
7879#[doc = "ID: 275"]
7880#[derive(Debug, Clone, PartialEq)]
7881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7883#[cfg_attr(feature = "ts", derive(TS))]
7884#[cfg_attr(feature = "ts", ts(export))]
7885pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7886    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7887    pub point_x: f32,
7888    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7889    pub point_y: f32,
7890    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7891    pub radius: f32,
7892    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7893    pub rec_top_x: f32,
7894    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7895    pub rec_top_y: f32,
7896    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7897    pub rec_bottom_x: f32,
7898    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7899    pub rec_bottom_y: f32,
7900    #[doc = "Current tracking status"]
7901    pub tracking_status: CameraTrackingStatusFlags,
7902    #[doc = "Current tracking mode"]
7903    pub tracking_mode: CameraTrackingMode,
7904    #[doc = "Defines location of target data"]
7905    pub target_data: CameraTrackingTargetData,
7906    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7907    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7908    pub camera_device_id: u8,
7909}
7910impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7911    pub const ENCODED_LEN: usize = 32usize;
7912    pub const DEFAULT: Self = Self {
7913        point_x: 0.0_f32,
7914        point_y: 0.0_f32,
7915        radius: 0.0_f32,
7916        rec_top_x: 0.0_f32,
7917        rec_top_y: 0.0_f32,
7918        rec_bottom_x: 0.0_f32,
7919        rec_bottom_y: 0.0_f32,
7920        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7921        tracking_mode: CameraTrackingMode::DEFAULT,
7922        target_data: CameraTrackingTargetData::DEFAULT,
7923        camera_device_id: 0_u8,
7924    };
7925    #[cfg(feature = "arbitrary")]
7926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7927        use arbitrary::{Arbitrary, Unstructured};
7928        let mut buf = [0u8; 1024];
7929        rng.fill_bytes(&mut buf);
7930        let mut unstructured = Unstructured::new(&buf);
7931        Self::arbitrary(&mut unstructured).unwrap_or_default()
7932    }
7933}
7934impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7935    fn default() -> Self {
7936        Self::DEFAULT.clone()
7937    }
7938}
7939impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7940    type Message = MavMessage;
7941    const ID: u32 = 275u32;
7942    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7943    const EXTRA_CRC: u8 = 126u8;
7944    const ENCODED_LEN: usize = 32usize;
7945    fn deser(
7946        _version: MavlinkVersion,
7947        __input: &[u8],
7948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7949        let avail_len = __input.len();
7950        let mut payload_buf = [0; Self::ENCODED_LEN];
7951        let mut buf = if avail_len < Self::ENCODED_LEN {
7952            payload_buf[0..avail_len].copy_from_slice(__input);
7953            Bytes::new(&payload_buf)
7954        } else {
7955            Bytes::new(__input)
7956        };
7957        let mut __struct = Self::default();
7958        __struct.point_x = buf.get_f32_le();
7959        __struct.point_y = buf.get_f32_le();
7960        __struct.radius = buf.get_f32_le();
7961        __struct.rec_top_x = buf.get_f32_le();
7962        __struct.rec_top_y = buf.get_f32_le();
7963        __struct.rec_bottom_x = buf.get_f32_le();
7964        __struct.rec_bottom_y = buf.get_f32_le();
7965        let tmp = buf.get_u8();
7966        __struct.tracking_status =
7967            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7968                enum_type: "CameraTrackingStatusFlags",
7969                value: tmp as u32,
7970            })?;
7971        let tmp = buf.get_u8();
7972        __struct.tracking_mode =
7973            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7974                enum_type: "CameraTrackingMode",
7975                value: tmp as u32,
7976            })?;
7977        let tmp = buf.get_u8();
7978        __struct.target_data =
7979            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7980                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7981                    flag_type: "CameraTrackingTargetData",
7982                    value: tmp as u32,
7983                })?;
7984        __struct.camera_device_id = buf.get_u8();
7985        Ok(__struct)
7986    }
7987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7988        let mut __tmp = BytesMut::new(bytes);
7989        #[allow(clippy::absurd_extreme_comparisons)]
7990        #[allow(unused_comparisons)]
7991        if __tmp.remaining() < Self::ENCODED_LEN {
7992            panic!(
7993                "buffer is too small (need {} bytes, but got {})",
7994                Self::ENCODED_LEN,
7995                __tmp.remaining(),
7996            )
7997        }
7998        __tmp.put_f32_le(self.point_x);
7999        __tmp.put_f32_le(self.point_y);
8000        __tmp.put_f32_le(self.radius);
8001        __tmp.put_f32_le(self.rec_top_x);
8002        __tmp.put_f32_le(self.rec_top_y);
8003        __tmp.put_f32_le(self.rec_bottom_x);
8004        __tmp.put_f32_le(self.rec_bottom_y);
8005        __tmp.put_u8(self.tracking_status as u8);
8006        __tmp.put_u8(self.tracking_mode as u8);
8007        __tmp.put_u8(self.target_data.bits());
8008        if matches!(version, MavlinkVersion::V2) {
8009            __tmp.put_u8(self.camera_device_id);
8010            let len = __tmp.len();
8011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8012        } else {
8013            __tmp.len()
8014        }
8015    }
8016}
8017#[doc = "Camera-IMU triggering and synchronisation message."]
8018#[doc = ""]
8019#[doc = "ID: 112"]
8020#[derive(Debug, Clone, PartialEq)]
8021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8023#[cfg_attr(feature = "ts", derive(TS))]
8024#[cfg_attr(feature = "ts", ts(export))]
8025pub struct CAMERA_TRIGGER_DATA {
8026    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8027    pub time_usec: u64,
8028    #[doc = "Image frame sequence"]
8029    pub seq: u32,
8030}
8031impl CAMERA_TRIGGER_DATA {
8032    pub const ENCODED_LEN: usize = 12usize;
8033    pub const DEFAULT: Self = Self {
8034        time_usec: 0_u64,
8035        seq: 0_u32,
8036    };
8037    #[cfg(feature = "arbitrary")]
8038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8039        use arbitrary::{Arbitrary, Unstructured};
8040        let mut buf = [0u8; 1024];
8041        rng.fill_bytes(&mut buf);
8042        let mut unstructured = Unstructured::new(&buf);
8043        Self::arbitrary(&mut unstructured).unwrap_or_default()
8044    }
8045}
8046impl Default for CAMERA_TRIGGER_DATA {
8047    fn default() -> Self {
8048        Self::DEFAULT.clone()
8049    }
8050}
8051impl MessageData for CAMERA_TRIGGER_DATA {
8052    type Message = MavMessage;
8053    const ID: u32 = 112u32;
8054    const NAME: &'static str = "CAMERA_TRIGGER";
8055    const EXTRA_CRC: u8 = 174u8;
8056    const ENCODED_LEN: usize = 12usize;
8057    fn deser(
8058        _version: MavlinkVersion,
8059        __input: &[u8],
8060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8061        let avail_len = __input.len();
8062        let mut payload_buf = [0; Self::ENCODED_LEN];
8063        let mut buf = if avail_len < Self::ENCODED_LEN {
8064            payload_buf[0..avail_len].copy_from_slice(__input);
8065            Bytes::new(&payload_buf)
8066        } else {
8067            Bytes::new(__input)
8068        };
8069        let mut __struct = Self::default();
8070        __struct.time_usec = buf.get_u64_le();
8071        __struct.seq = buf.get_u32_le();
8072        Ok(__struct)
8073    }
8074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8075        let mut __tmp = BytesMut::new(bytes);
8076        #[allow(clippy::absurd_extreme_comparisons)]
8077        #[allow(unused_comparisons)]
8078        if __tmp.remaining() < Self::ENCODED_LEN {
8079            panic!(
8080                "buffer is too small (need {} bytes, but got {})",
8081                Self::ENCODED_LEN,
8082                __tmp.remaining(),
8083            )
8084        }
8085        __tmp.put_u64_le(self.time_usec);
8086        __tmp.put_u32_le(self.seq);
8087        if matches!(version, MavlinkVersion::V2) {
8088            let len = __tmp.len();
8089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8090        } else {
8091            __tmp.len()
8092        }
8093    }
8094}
8095#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8096#[doc = ""]
8097#[doc = "ID: 387"]
8098#[derive(Debug, Clone, PartialEq)]
8099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8101#[cfg_attr(feature = "ts", derive(TS))]
8102#[cfg_attr(feature = "ts", ts(export))]
8103pub struct CANFD_FRAME_DATA {
8104    #[doc = "Frame ID"]
8105    pub id: u32,
8106    #[doc = "System ID."]
8107    pub target_system: u8,
8108    #[doc = "Component ID."]
8109    pub target_component: u8,
8110    #[doc = "bus number"]
8111    pub bus: u8,
8112    #[doc = "Frame length"]
8113    pub len: u8,
8114    #[doc = "Frame data"]
8115    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8116    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8117    pub data: [u8; 64],
8118}
8119impl CANFD_FRAME_DATA {
8120    pub const ENCODED_LEN: usize = 72usize;
8121    pub const DEFAULT: Self = Self {
8122        id: 0_u32,
8123        target_system: 0_u8,
8124        target_component: 0_u8,
8125        bus: 0_u8,
8126        len: 0_u8,
8127        data: [0_u8; 64usize],
8128    };
8129    #[cfg(feature = "arbitrary")]
8130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8131        use arbitrary::{Arbitrary, Unstructured};
8132        let mut buf = [0u8; 1024];
8133        rng.fill_bytes(&mut buf);
8134        let mut unstructured = Unstructured::new(&buf);
8135        Self::arbitrary(&mut unstructured).unwrap_or_default()
8136    }
8137}
8138impl Default for CANFD_FRAME_DATA {
8139    fn default() -> Self {
8140        Self::DEFAULT.clone()
8141    }
8142}
8143impl MessageData for CANFD_FRAME_DATA {
8144    type Message = MavMessage;
8145    const ID: u32 = 387u32;
8146    const NAME: &'static str = "CANFD_FRAME";
8147    const EXTRA_CRC: u8 = 4u8;
8148    const ENCODED_LEN: usize = 72usize;
8149    fn deser(
8150        _version: MavlinkVersion,
8151        __input: &[u8],
8152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8153        let avail_len = __input.len();
8154        let mut payload_buf = [0; Self::ENCODED_LEN];
8155        let mut buf = if avail_len < Self::ENCODED_LEN {
8156            payload_buf[0..avail_len].copy_from_slice(__input);
8157            Bytes::new(&payload_buf)
8158        } else {
8159            Bytes::new(__input)
8160        };
8161        let mut __struct = Self::default();
8162        __struct.id = buf.get_u32_le();
8163        __struct.target_system = buf.get_u8();
8164        __struct.target_component = buf.get_u8();
8165        __struct.bus = buf.get_u8();
8166        __struct.len = buf.get_u8();
8167        for v in &mut __struct.data {
8168            let val = buf.get_u8();
8169            *v = val;
8170        }
8171        Ok(__struct)
8172    }
8173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8174        let mut __tmp = BytesMut::new(bytes);
8175        #[allow(clippy::absurd_extreme_comparisons)]
8176        #[allow(unused_comparisons)]
8177        if __tmp.remaining() < Self::ENCODED_LEN {
8178            panic!(
8179                "buffer is too small (need {} bytes, but got {})",
8180                Self::ENCODED_LEN,
8181                __tmp.remaining(),
8182            )
8183        }
8184        __tmp.put_u32_le(self.id);
8185        __tmp.put_u8(self.target_system);
8186        __tmp.put_u8(self.target_component);
8187        __tmp.put_u8(self.bus);
8188        __tmp.put_u8(self.len);
8189        for val in &self.data {
8190            __tmp.put_u8(*val);
8191        }
8192        if matches!(version, MavlinkVersion::V2) {
8193            let len = __tmp.len();
8194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8195        } else {
8196            __tmp.len()
8197        }
8198    }
8199}
8200#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8201#[doc = ""]
8202#[doc = "ID: 388"]
8203#[derive(Debug, Clone, PartialEq)]
8204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8206#[cfg_attr(feature = "ts", derive(TS))]
8207#[cfg_attr(feature = "ts", ts(export))]
8208pub struct CAN_FILTER_MODIFY_DATA {
8209    #[doc = "filter IDs, length num_ids"]
8210    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8211    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8212    pub ids: [u16; 16],
8213    #[doc = "System ID."]
8214    pub target_system: u8,
8215    #[doc = "Component ID."]
8216    pub target_component: u8,
8217    #[doc = "bus number"]
8218    pub bus: u8,
8219    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8220    pub operation: CanFilterOp,
8221    #[doc = "number of IDs in filter list"]
8222    pub num_ids: u8,
8223}
8224impl CAN_FILTER_MODIFY_DATA {
8225    pub const ENCODED_LEN: usize = 37usize;
8226    pub const DEFAULT: Self = Self {
8227        ids: [0_u16; 16usize],
8228        target_system: 0_u8,
8229        target_component: 0_u8,
8230        bus: 0_u8,
8231        operation: CanFilterOp::DEFAULT,
8232        num_ids: 0_u8,
8233    };
8234    #[cfg(feature = "arbitrary")]
8235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8236        use arbitrary::{Arbitrary, Unstructured};
8237        let mut buf = [0u8; 1024];
8238        rng.fill_bytes(&mut buf);
8239        let mut unstructured = Unstructured::new(&buf);
8240        Self::arbitrary(&mut unstructured).unwrap_or_default()
8241    }
8242}
8243impl Default for CAN_FILTER_MODIFY_DATA {
8244    fn default() -> Self {
8245        Self::DEFAULT.clone()
8246    }
8247}
8248impl MessageData for CAN_FILTER_MODIFY_DATA {
8249    type Message = MavMessage;
8250    const ID: u32 = 388u32;
8251    const NAME: &'static str = "CAN_FILTER_MODIFY";
8252    const EXTRA_CRC: u8 = 8u8;
8253    const ENCODED_LEN: usize = 37usize;
8254    fn deser(
8255        _version: MavlinkVersion,
8256        __input: &[u8],
8257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8258        let avail_len = __input.len();
8259        let mut payload_buf = [0; Self::ENCODED_LEN];
8260        let mut buf = if avail_len < Self::ENCODED_LEN {
8261            payload_buf[0..avail_len].copy_from_slice(__input);
8262            Bytes::new(&payload_buf)
8263        } else {
8264            Bytes::new(__input)
8265        };
8266        let mut __struct = Self::default();
8267        for v in &mut __struct.ids {
8268            let val = buf.get_u16_le();
8269            *v = val;
8270        }
8271        __struct.target_system = buf.get_u8();
8272        __struct.target_component = buf.get_u8();
8273        __struct.bus = buf.get_u8();
8274        let tmp = buf.get_u8();
8275        __struct.operation =
8276            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8277                enum_type: "CanFilterOp",
8278                value: tmp as u32,
8279            })?;
8280        __struct.num_ids = buf.get_u8();
8281        Ok(__struct)
8282    }
8283    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8284        let mut __tmp = BytesMut::new(bytes);
8285        #[allow(clippy::absurd_extreme_comparisons)]
8286        #[allow(unused_comparisons)]
8287        if __tmp.remaining() < Self::ENCODED_LEN {
8288            panic!(
8289                "buffer is too small (need {} bytes, but got {})",
8290                Self::ENCODED_LEN,
8291                __tmp.remaining(),
8292            )
8293        }
8294        for val in &self.ids {
8295            __tmp.put_u16_le(*val);
8296        }
8297        __tmp.put_u8(self.target_system);
8298        __tmp.put_u8(self.target_component);
8299        __tmp.put_u8(self.bus);
8300        __tmp.put_u8(self.operation as u8);
8301        __tmp.put_u8(self.num_ids);
8302        if matches!(version, MavlinkVersion::V2) {
8303            let len = __tmp.len();
8304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8305        } else {
8306            __tmp.len()
8307        }
8308    }
8309}
8310#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8311#[doc = ""]
8312#[doc = "ID: 386"]
8313#[derive(Debug, Clone, PartialEq)]
8314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8316#[cfg_attr(feature = "ts", derive(TS))]
8317#[cfg_attr(feature = "ts", ts(export))]
8318pub struct CAN_FRAME_DATA {
8319    #[doc = "Frame ID"]
8320    pub id: u32,
8321    #[doc = "System ID."]
8322    pub target_system: u8,
8323    #[doc = "Component ID."]
8324    pub target_component: u8,
8325    #[doc = "Bus number"]
8326    pub bus: u8,
8327    #[doc = "Frame length"]
8328    pub len: u8,
8329    #[doc = "Frame data"]
8330    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8331    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8332    pub data: [u8; 8],
8333}
8334impl CAN_FRAME_DATA {
8335    pub const ENCODED_LEN: usize = 16usize;
8336    pub const DEFAULT: Self = Self {
8337        id: 0_u32,
8338        target_system: 0_u8,
8339        target_component: 0_u8,
8340        bus: 0_u8,
8341        len: 0_u8,
8342        data: [0_u8; 8usize],
8343    };
8344    #[cfg(feature = "arbitrary")]
8345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8346        use arbitrary::{Arbitrary, Unstructured};
8347        let mut buf = [0u8; 1024];
8348        rng.fill_bytes(&mut buf);
8349        let mut unstructured = Unstructured::new(&buf);
8350        Self::arbitrary(&mut unstructured).unwrap_or_default()
8351    }
8352}
8353impl Default for CAN_FRAME_DATA {
8354    fn default() -> Self {
8355        Self::DEFAULT.clone()
8356    }
8357}
8358impl MessageData for CAN_FRAME_DATA {
8359    type Message = MavMessage;
8360    const ID: u32 = 386u32;
8361    const NAME: &'static str = "CAN_FRAME";
8362    const EXTRA_CRC: u8 = 132u8;
8363    const ENCODED_LEN: usize = 16usize;
8364    fn deser(
8365        _version: MavlinkVersion,
8366        __input: &[u8],
8367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8368        let avail_len = __input.len();
8369        let mut payload_buf = [0; Self::ENCODED_LEN];
8370        let mut buf = if avail_len < Self::ENCODED_LEN {
8371            payload_buf[0..avail_len].copy_from_slice(__input);
8372            Bytes::new(&payload_buf)
8373        } else {
8374            Bytes::new(__input)
8375        };
8376        let mut __struct = Self::default();
8377        __struct.id = buf.get_u32_le();
8378        __struct.target_system = buf.get_u8();
8379        __struct.target_component = buf.get_u8();
8380        __struct.bus = buf.get_u8();
8381        __struct.len = buf.get_u8();
8382        for v in &mut __struct.data {
8383            let val = buf.get_u8();
8384            *v = val;
8385        }
8386        Ok(__struct)
8387    }
8388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8389        let mut __tmp = BytesMut::new(bytes);
8390        #[allow(clippy::absurd_extreme_comparisons)]
8391        #[allow(unused_comparisons)]
8392        if __tmp.remaining() < Self::ENCODED_LEN {
8393            panic!(
8394                "buffer is too small (need {} bytes, but got {})",
8395                Self::ENCODED_LEN,
8396                __tmp.remaining(),
8397            )
8398        }
8399        __tmp.put_u32_le(self.id);
8400        __tmp.put_u8(self.target_system);
8401        __tmp.put_u8(self.target_component);
8402        __tmp.put_u8(self.bus);
8403        __tmp.put_u8(self.len);
8404        for val in &self.data {
8405            __tmp.put_u8(*val);
8406        }
8407        if matches!(version, MavlinkVersion::V2) {
8408            let len = __tmp.len();
8409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8410        } else {
8411            __tmp.len()
8412        }
8413    }
8414}
8415#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8416#[doc = ""]
8417#[doc = "ID: 336"]
8418#[derive(Debug, Clone, PartialEq)]
8419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8421#[cfg_attr(feature = "ts", derive(TS))]
8422#[cfg_attr(feature = "ts", ts(export))]
8423pub struct CELLULAR_CONFIG_DATA {
8424    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8425    pub enable_lte: u8,
8426    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8427    pub enable_pin: u8,
8428    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8429    #[cfg_attr(
8430        feature = "serde",
8431        serde(
8432            serialize_with = "crate::nulstr::serialize::<_, 16>",
8433            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8434        )
8435    )]
8436    #[cfg_attr(feature = "ts", ts(type = "string"))]
8437    pub pin: [u8; 16],
8438    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8439    #[cfg_attr(
8440        feature = "serde",
8441        serde(
8442            serialize_with = "crate::nulstr::serialize::<_, 16>",
8443            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8444        )
8445    )]
8446    #[cfg_attr(feature = "ts", ts(type = "string"))]
8447    pub new_pin: [u8; 16],
8448    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8449    #[cfg_attr(
8450        feature = "serde",
8451        serde(
8452            serialize_with = "crate::nulstr::serialize::<_, 32>",
8453            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
8454        )
8455    )]
8456    #[cfg_attr(feature = "ts", ts(type = "string"))]
8457    pub apn: [u8; 32],
8458    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8459    #[cfg_attr(
8460        feature = "serde",
8461        serde(
8462            serialize_with = "crate::nulstr::serialize::<_, 16>",
8463            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8464        )
8465    )]
8466    #[cfg_attr(feature = "ts", ts(type = "string"))]
8467    pub puk: [u8; 16],
8468    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8469    pub roaming: u8,
8470    #[doc = "Message acceptance response (sent back to GS)."]
8471    pub response: CellularConfigResponse,
8472}
8473impl CELLULAR_CONFIG_DATA {
8474    pub const ENCODED_LEN: usize = 84usize;
8475    pub const DEFAULT: Self = Self {
8476        enable_lte: 0_u8,
8477        enable_pin: 0_u8,
8478        pin: [0_u8; 16usize],
8479        new_pin: [0_u8; 16usize],
8480        apn: [0_u8; 32usize],
8481        puk: [0_u8; 16usize],
8482        roaming: 0_u8,
8483        response: CellularConfigResponse::DEFAULT,
8484    };
8485    #[cfg(feature = "arbitrary")]
8486    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8487        use arbitrary::{Arbitrary, Unstructured};
8488        let mut buf = [0u8; 1024];
8489        rng.fill_bytes(&mut buf);
8490        let mut unstructured = Unstructured::new(&buf);
8491        Self::arbitrary(&mut unstructured).unwrap_or_default()
8492    }
8493}
8494impl Default for CELLULAR_CONFIG_DATA {
8495    fn default() -> Self {
8496        Self::DEFAULT.clone()
8497    }
8498}
8499impl MessageData for CELLULAR_CONFIG_DATA {
8500    type Message = MavMessage;
8501    const ID: u32 = 336u32;
8502    const NAME: &'static str = "CELLULAR_CONFIG";
8503    const EXTRA_CRC: u8 = 245u8;
8504    const ENCODED_LEN: usize = 84usize;
8505    fn deser(
8506        _version: MavlinkVersion,
8507        __input: &[u8],
8508    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8509        let avail_len = __input.len();
8510        let mut payload_buf = [0; Self::ENCODED_LEN];
8511        let mut buf = if avail_len < Self::ENCODED_LEN {
8512            payload_buf[0..avail_len].copy_from_slice(__input);
8513            Bytes::new(&payload_buf)
8514        } else {
8515            Bytes::new(__input)
8516        };
8517        let mut __struct = Self::default();
8518        __struct.enable_lte = buf.get_u8();
8519        __struct.enable_pin = buf.get_u8();
8520        for v in &mut __struct.pin {
8521            let val = buf.get_u8();
8522            *v = val;
8523        }
8524        for v in &mut __struct.new_pin {
8525            let val = buf.get_u8();
8526            *v = val;
8527        }
8528        for v in &mut __struct.apn {
8529            let val = buf.get_u8();
8530            *v = val;
8531        }
8532        for v in &mut __struct.puk {
8533            let val = buf.get_u8();
8534            *v = val;
8535        }
8536        __struct.roaming = buf.get_u8();
8537        let tmp = buf.get_u8();
8538        __struct.response =
8539            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8540                enum_type: "CellularConfigResponse",
8541                value: tmp as u32,
8542            })?;
8543        Ok(__struct)
8544    }
8545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8546        let mut __tmp = BytesMut::new(bytes);
8547        #[allow(clippy::absurd_extreme_comparisons)]
8548        #[allow(unused_comparisons)]
8549        if __tmp.remaining() < Self::ENCODED_LEN {
8550            panic!(
8551                "buffer is too small (need {} bytes, but got {})",
8552                Self::ENCODED_LEN,
8553                __tmp.remaining(),
8554            )
8555        }
8556        __tmp.put_u8(self.enable_lte);
8557        __tmp.put_u8(self.enable_pin);
8558        for val in &self.pin {
8559            __tmp.put_u8(*val);
8560        }
8561        for val in &self.new_pin {
8562            __tmp.put_u8(*val);
8563        }
8564        for val in &self.apn {
8565            __tmp.put_u8(*val);
8566        }
8567        for val in &self.puk {
8568            __tmp.put_u8(*val);
8569        }
8570        __tmp.put_u8(self.roaming);
8571        __tmp.put_u8(self.response as u8);
8572        if matches!(version, MavlinkVersion::V2) {
8573            let len = __tmp.len();
8574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8575        } else {
8576            __tmp.len()
8577        }
8578    }
8579}
8580#[doc = "Report current used cellular network status."]
8581#[doc = ""]
8582#[doc = "ID: 334"]
8583#[derive(Debug, Clone, PartialEq)]
8584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8586#[cfg_attr(feature = "ts", derive(TS))]
8587#[cfg_attr(feature = "ts", ts(export))]
8588pub struct CELLULAR_STATUS_DATA {
8589    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8590    pub mcc: u16,
8591    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8592    pub mnc: u16,
8593    #[doc = "Location area code. If unknown, set to 0"]
8594    pub lac: u16,
8595    #[doc = "Cellular modem status"]
8596    pub status: CellularStatusFlag,
8597    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8598    pub failure_reason: CellularNetworkFailedReason,
8599    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8600    pub mavtype: CellularNetworkRadioType,
8601    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8602    pub quality: u8,
8603}
8604impl CELLULAR_STATUS_DATA {
8605    pub const ENCODED_LEN: usize = 10usize;
8606    pub const DEFAULT: Self = Self {
8607        mcc: 0_u16,
8608        mnc: 0_u16,
8609        lac: 0_u16,
8610        status: CellularStatusFlag::DEFAULT,
8611        failure_reason: CellularNetworkFailedReason::DEFAULT,
8612        mavtype: CellularNetworkRadioType::DEFAULT,
8613        quality: 0_u8,
8614    };
8615    #[cfg(feature = "arbitrary")]
8616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8617        use arbitrary::{Arbitrary, Unstructured};
8618        let mut buf = [0u8; 1024];
8619        rng.fill_bytes(&mut buf);
8620        let mut unstructured = Unstructured::new(&buf);
8621        Self::arbitrary(&mut unstructured).unwrap_or_default()
8622    }
8623}
8624impl Default for CELLULAR_STATUS_DATA {
8625    fn default() -> Self {
8626        Self::DEFAULT.clone()
8627    }
8628}
8629impl MessageData for CELLULAR_STATUS_DATA {
8630    type Message = MavMessage;
8631    const ID: u32 = 334u32;
8632    const NAME: &'static str = "CELLULAR_STATUS";
8633    const EXTRA_CRC: u8 = 72u8;
8634    const ENCODED_LEN: usize = 10usize;
8635    fn deser(
8636        _version: MavlinkVersion,
8637        __input: &[u8],
8638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8639        let avail_len = __input.len();
8640        let mut payload_buf = [0; Self::ENCODED_LEN];
8641        let mut buf = if avail_len < Self::ENCODED_LEN {
8642            payload_buf[0..avail_len].copy_from_slice(__input);
8643            Bytes::new(&payload_buf)
8644        } else {
8645            Bytes::new(__input)
8646        };
8647        let mut __struct = Self::default();
8648        __struct.mcc = buf.get_u16_le();
8649        __struct.mnc = buf.get_u16_le();
8650        __struct.lac = buf.get_u16_le();
8651        let tmp = buf.get_u8();
8652        __struct.status =
8653            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8654                enum_type: "CellularStatusFlag",
8655                value: tmp as u32,
8656            })?;
8657        let tmp = buf.get_u8();
8658        __struct.failure_reason =
8659            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8660                enum_type: "CellularNetworkFailedReason",
8661                value: tmp as u32,
8662            })?;
8663        let tmp = buf.get_u8();
8664        __struct.mavtype =
8665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8666                enum_type: "CellularNetworkRadioType",
8667                value: tmp as u32,
8668            })?;
8669        __struct.quality = buf.get_u8();
8670        Ok(__struct)
8671    }
8672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8673        let mut __tmp = BytesMut::new(bytes);
8674        #[allow(clippy::absurd_extreme_comparisons)]
8675        #[allow(unused_comparisons)]
8676        if __tmp.remaining() < Self::ENCODED_LEN {
8677            panic!(
8678                "buffer is too small (need {} bytes, but got {})",
8679                Self::ENCODED_LEN,
8680                __tmp.remaining(),
8681            )
8682        }
8683        __tmp.put_u16_le(self.mcc);
8684        __tmp.put_u16_le(self.mnc);
8685        __tmp.put_u16_le(self.lac);
8686        __tmp.put_u8(self.status as u8);
8687        __tmp.put_u8(self.failure_reason as u8);
8688        __tmp.put_u8(self.mavtype as u8);
8689        __tmp.put_u8(self.quality);
8690        if matches!(version, MavlinkVersion::V2) {
8691            let len = __tmp.len();
8692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8693        } else {
8694            __tmp.len()
8695        }
8696    }
8697}
8698#[doc = "Request to control this MAV."]
8699#[doc = ""]
8700#[doc = "ID: 5"]
8701#[derive(Debug, Clone, PartialEq)]
8702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8704#[cfg_attr(feature = "ts", derive(TS))]
8705#[cfg_attr(feature = "ts", ts(export))]
8706pub struct CHANGE_OPERATOR_CONTROL_DATA {
8707    #[doc = "System the GCS requests control for"]
8708    pub target_system: u8,
8709    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8710    pub control_request: u8,
8711    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8712    pub version: u8,
8713    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8714    #[cfg_attr(
8715        feature = "serde",
8716        serde(
8717            serialize_with = "crate::nulstr::serialize::<_, 25>",
8718            deserialize_with = "crate::nulstr::deserialize::<_, 25>"
8719        )
8720    )]
8721    #[cfg_attr(feature = "ts", ts(type = "string"))]
8722    pub passkey: [u8; 25],
8723}
8724impl CHANGE_OPERATOR_CONTROL_DATA {
8725    pub const ENCODED_LEN: usize = 28usize;
8726    pub const DEFAULT: Self = Self {
8727        target_system: 0_u8,
8728        control_request: 0_u8,
8729        version: 0_u8,
8730        passkey: [0_u8; 25usize],
8731    };
8732    #[cfg(feature = "arbitrary")]
8733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8734        use arbitrary::{Arbitrary, Unstructured};
8735        let mut buf = [0u8; 1024];
8736        rng.fill_bytes(&mut buf);
8737        let mut unstructured = Unstructured::new(&buf);
8738        Self::arbitrary(&mut unstructured).unwrap_or_default()
8739    }
8740}
8741impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8742    fn default() -> Self {
8743        Self::DEFAULT.clone()
8744    }
8745}
8746impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8747    type Message = MavMessage;
8748    const ID: u32 = 5u32;
8749    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8750    const EXTRA_CRC: u8 = 217u8;
8751    const ENCODED_LEN: usize = 28usize;
8752    fn deser(
8753        _version: MavlinkVersion,
8754        __input: &[u8],
8755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8756        let avail_len = __input.len();
8757        let mut payload_buf = [0; Self::ENCODED_LEN];
8758        let mut buf = if avail_len < Self::ENCODED_LEN {
8759            payload_buf[0..avail_len].copy_from_slice(__input);
8760            Bytes::new(&payload_buf)
8761        } else {
8762            Bytes::new(__input)
8763        };
8764        let mut __struct = Self::default();
8765        __struct.target_system = buf.get_u8();
8766        __struct.control_request = buf.get_u8();
8767        __struct.version = buf.get_u8();
8768        for v in &mut __struct.passkey {
8769            let val = buf.get_u8();
8770            *v = val;
8771        }
8772        Ok(__struct)
8773    }
8774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8775        let mut __tmp = BytesMut::new(bytes);
8776        #[allow(clippy::absurd_extreme_comparisons)]
8777        #[allow(unused_comparisons)]
8778        if __tmp.remaining() < Self::ENCODED_LEN {
8779            panic!(
8780                "buffer is too small (need {} bytes, but got {})",
8781                Self::ENCODED_LEN,
8782                __tmp.remaining(),
8783            )
8784        }
8785        __tmp.put_u8(self.target_system);
8786        __tmp.put_u8(self.control_request);
8787        __tmp.put_u8(self.version);
8788        for val in &self.passkey {
8789            __tmp.put_u8(*val);
8790        }
8791        if matches!(version, MavlinkVersion::V2) {
8792            let len = __tmp.len();
8793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8794        } else {
8795            __tmp.len()
8796        }
8797    }
8798}
8799#[doc = "Accept / deny control of this MAV."]
8800#[doc = ""]
8801#[doc = "ID: 6"]
8802#[derive(Debug, Clone, PartialEq)]
8803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8805#[cfg_attr(feature = "ts", derive(TS))]
8806#[cfg_attr(feature = "ts", ts(export))]
8807pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8808    #[doc = "ID of the GCS this message"]
8809    pub gcs_system_id: u8,
8810    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8811    pub control_request: u8,
8812    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8813    pub ack: u8,
8814}
8815impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8816    pub const ENCODED_LEN: usize = 3usize;
8817    pub const DEFAULT: Self = Self {
8818        gcs_system_id: 0_u8,
8819        control_request: 0_u8,
8820        ack: 0_u8,
8821    };
8822    #[cfg(feature = "arbitrary")]
8823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8824        use arbitrary::{Arbitrary, Unstructured};
8825        let mut buf = [0u8; 1024];
8826        rng.fill_bytes(&mut buf);
8827        let mut unstructured = Unstructured::new(&buf);
8828        Self::arbitrary(&mut unstructured).unwrap_or_default()
8829    }
8830}
8831impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8832    fn default() -> Self {
8833        Self::DEFAULT.clone()
8834    }
8835}
8836impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8837    type Message = MavMessage;
8838    const ID: u32 = 6u32;
8839    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8840    const EXTRA_CRC: u8 = 104u8;
8841    const ENCODED_LEN: usize = 3usize;
8842    fn deser(
8843        _version: MavlinkVersion,
8844        __input: &[u8],
8845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8846        let avail_len = __input.len();
8847        let mut payload_buf = [0; Self::ENCODED_LEN];
8848        let mut buf = if avail_len < Self::ENCODED_LEN {
8849            payload_buf[0..avail_len].copy_from_slice(__input);
8850            Bytes::new(&payload_buf)
8851        } else {
8852            Bytes::new(__input)
8853        };
8854        let mut __struct = Self::default();
8855        __struct.gcs_system_id = buf.get_u8();
8856        __struct.control_request = buf.get_u8();
8857        __struct.ack = buf.get_u8();
8858        Ok(__struct)
8859    }
8860    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8861        let mut __tmp = BytesMut::new(bytes);
8862        #[allow(clippy::absurd_extreme_comparisons)]
8863        #[allow(unused_comparisons)]
8864        if __tmp.remaining() < Self::ENCODED_LEN {
8865            panic!(
8866                "buffer is too small (need {} bytes, but got {})",
8867                Self::ENCODED_LEN,
8868                __tmp.remaining(),
8869            )
8870        }
8871        __tmp.put_u8(self.gcs_system_id);
8872        __tmp.put_u8(self.control_request);
8873        __tmp.put_u8(self.ack);
8874        if matches!(version, MavlinkVersion::V2) {
8875            let len = __tmp.len();
8876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8877        } else {
8878            __tmp.len()
8879        }
8880    }
8881}
8882#[doc = "Information about a potential collision."]
8883#[doc = ""]
8884#[doc = "ID: 247"]
8885#[derive(Debug, Clone, PartialEq)]
8886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8888#[cfg_attr(feature = "ts", derive(TS))]
8889#[cfg_attr(feature = "ts", ts(export))]
8890pub struct COLLISION_DATA {
8891    #[doc = "Unique identifier, domain based on src field"]
8892    pub id: u32,
8893    #[doc = "Estimated time until collision occurs"]
8894    pub time_to_minimum_delta: f32,
8895    #[doc = "Closest vertical distance between vehicle and object"]
8896    pub altitude_minimum_delta: f32,
8897    #[doc = "Closest horizontal distance between vehicle and object"]
8898    pub horizontal_minimum_delta: f32,
8899    #[doc = "Collision data source"]
8900    pub src: MavCollisionSrc,
8901    #[doc = "Action that is being taken to avoid this collision"]
8902    pub action: MavCollisionAction,
8903    #[doc = "How concerned the aircraft is about this collision"]
8904    pub threat_level: MavCollisionThreatLevel,
8905}
8906impl COLLISION_DATA {
8907    pub const ENCODED_LEN: usize = 19usize;
8908    pub const DEFAULT: Self = Self {
8909        id: 0_u32,
8910        time_to_minimum_delta: 0.0_f32,
8911        altitude_minimum_delta: 0.0_f32,
8912        horizontal_minimum_delta: 0.0_f32,
8913        src: MavCollisionSrc::DEFAULT,
8914        action: MavCollisionAction::DEFAULT,
8915        threat_level: MavCollisionThreatLevel::DEFAULT,
8916    };
8917    #[cfg(feature = "arbitrary")]
8918    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8919        use arbitrary::{Arbitrary, Unstructured};
8920        let mut buf = [0u8; 1024];
8921        rng.fill_bytes(&mut buf);
8922        let mut unstructured = Unstructured::new(&buf);
8923        Self::arbitrary(&mut unstructured).unwrap_or_default()
8924    }
8925}
8926impl Default for COLLISION_DATA {
8927    fn default() -> Self {
8928        Self::DEFAULT.clone()
8929    }
8930}
8931impl MessageData for COLLISION_DATA {
8932    type Message = MavMessage;
8933    const ID: u32 = 247u32;
8934    const NAME: &'static str = "COLLISION";
8935    const EXTRA_CRC: u8 = 81u8;
8936    const ENCODED_LEN: usize = 19usize;
8937    fn deser(
8938        _version: MavlinkVersion,
8939        __input: &[u8],
8940    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8941        let avail_len = __input.len();
8942        let mut payload_buf = [0; Self::ENCODED_LEN];
8943        let mut buf = if avail_len < Self::ENCODED_LEN {
8944            payload_buf[0..avail_len].copy_from_slice(__input);
8945            Bytes::new(&payload_buf)
8946        } else {
8947            Bytes::new(__input)
8948        };
8949        let mut __struct = Self::default();
8950        __struct.id = buf.get_u32_le();
8951        __struct.time_to_minimum_delta = buf.get_f32_le();
8952        __struct.altitude_minimum_delta = buf.get_f32_le();
8953        __struct.horizontal_minimum_delta = buf.get_f32_le();
8954        let tmp = buf.get_u8();
8955        __struct.src =
8956            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8957                enum_type: "MavCollisionSrc",
8958                value: tmp as u32,
8959            })?;
8960        let tmp = buf.get_u8();
8961        __struct.action =
8962            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8963                enum_type: "MavCollisionAction",
8964                value: tmp as u32,
8965            })?;
8966        let tmp = buf.get_u8();
8967        __struct.threat_level =
8968            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8969                enum_type: "MavCollisionThreatLevel",
8970                value: tmp as u32,
8971            })?;
8972        Ok(__struct)
8973    }
8974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8975        let mut __tmp = BytesMut::new(bytes);
8976        #[allow(clippy::absurd_extreme_comparisons)]
8977        #[allow(unused_comparisons)]
8978        if __tmp.remaining() < Self::ENCODED_LEN {
8979            panic!(
8980                "buffer is too small (need {} bytes, but got {})",
8981                Self::ENCODED_LEN,
8982                __tmp.remaining(),
8983            )
8984        }
8985        __tmp.put_u32_le(self.id);
8986        __tmp.put_f32_le(self.time_to_minimum_delta);
8987        __tmp.put_f32_le(self.altitude_minimum_delta);
8988        __tmp.put_f32_le(self.horizontal_minimum_delta);
8989        __tmp.put_u8(self.src as u8);
8990        __tmp.put_u8(self.action as u8);
8991        __tmp.put_u8(self.threat_level as u8);
8992        if matches!(version, MavlinkVersion::V2) {
8993            let len = __tmp.len();
8994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8995        } else {
8996            __tmp.len()
8997        }
8998    }
8999}
9000#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9001#[doc = ""]
9002#[doc = "ID: 77"]
9003#[derive(Debug, Clone, PartialEq)]
9004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9006#[cfg_attr(feature = "ts", derive(TS))]
9007#[cfg_attr(feature = "ts", ts(export))]
9008pub struct COMMAND_ACK_DATA {
9009    #[doc = "Command ID (of acknowledged command)."]
9010    pub command: MavCmd,
9011    #[doc = "Result of command."]
9012    pub result: MavResult,
9013    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9015    pub progress: u8,
9016    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9018    pub result_param2: i32,
9019    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9020    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9021    pub target_system: u8,
9022    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9023    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9024    pub target_component: u8,
9025}
9026impl COMMAND_ACK_DATA {
9027    pub const ENCODED_LEN: usize = 10usize;
9028    pub const DEFAULT: Self = Self {
9029        command: MavCmd::DEFAULT,
9030        result: MavResult::DEFAULT,
9031        progress: 0_u8,
9032        result_param2: 0_i32,
9033        target_system: 0_u8,
9034        target_component: 0_u8,
9035    };
9036    #[cfg(feature = "arbitrary")]
9037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9038        use arbitrary::{Arbitrary, Unstructured};
9039        let mut buf = [0u8; 1024];
9040        rng.fill_bytes(&mut buf);
9041        let mut unstructured = Unstructured::new(&buf);
9042        Self::arbitrary(&mut unstructured).unwrap_or_default()
9043    }
9044}
9045impl Default for COMMAND_ACK_DATA {
9046    fn default() -> Self {
9047        Self::DEFAULT.clone()
9048    }
9049}
9050impl MessageData for COMMAND_ACK_DATA {
9051    type Message = MavMessage;
9052    const ID: u32 = 77u32;
9053    const NAME: &'static str = "COMMAND_ACK";
9054    const EXTRA_CRC: u8 = 143u8;
9055    const ENCODED_LEN: usize = 10usize;
9056    fn deser(
9057        _version: MavlinkVersion,
9058        __input: &[u8],
9059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9060        let avail_len = __input.len();
9061        let mut payload_buf = [0; Self::ENCODED_LEN];
9062        let mut buf = if avail_len < Self::ENCODED_LEN {
9063            payload_buf[0..avail_len].copy_from_slice(__input);
9064            Bytes::new(&payload_buf)
9065        } else {
9066            Bytes::new(__input)
9067        };
9068        let mut __struct = Self::default();
9069        let tmp = buf.get_u16_le();
9070        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9071            ::mavlink_core::error::ParserError::InvalidEnum {
9072                enum_type: "MavCmd",
9073                value: tmp as u32,
9074            },
9075        )?;
9076        let tmp = buf.get_u8();
9077        __struct.result =
9078            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9079                enum_type: "MavResult",
9080                value: tmp as u32,
9081            })?;
9082        __struct.progress = buf.get_u8();
9083        __struct.result_param2 = buf.get_i32_le();
9084        __struct.target_system = buf.get_u8();
9085        __struct.target_component = buf.get_u8();
9086        Ok(__struct)
9087    }
9088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9089        let mut __tmp = BytesMut::new(bytes);
9090        #[allow(clippy::absurd_extreme_comparisons)]
9091        #[allow(unused_comparisons)]
9092        if __tmp.remaining() < Self::ENCODED_LEN {
9093            panic!(
9094                "buffer is too small (need {} bytes, but got {})",
9095                Self::ENCODED_LEN,
9096                __tmp.remaining(),
9097            )
9098        }
9099        __tmp.put_u16_le(self.command as u16);
9100        __tmp.put_u8(self.result as u8);
9101        if matches!(version, MavlinkVersion::V2) {
9102            __tmp.put_u8(self.progress);
9103            __tmp.put_i32_le(self.result_param2);
9104            __tmp.put_u8(self.target_system);
9105            __tmp.put_u8(self.target_component);
9106            let len = __tmp.len();
9107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9108        } else {
9109            __tmp.len()
9110        }
9111    }
9112}
9113#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9114#[doc = ""]
9115#[doc = "ID: 80"]
9116#[derive(Debug, Clone, PartialEq)]
9117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9119#[cfg_attr(feature = "ts", derive(TS))]
9120#[cfg_attr(feature = "ts", ts(export))]
9121pub struct COMMAND_CANCEL_DATA {
9122    #[doc = "Command ID (of command to cancel)."]
9123    pub command: MavCmd,
9124    #[doc = "System executing long running command. Should not be broadcast (0)."]
9125    pub target_system: u8,
9126    #[doc = "Component executing long running command."]
9127    pub target_component: u8,
9128}
9129impl COMMAND_CANCEL_DATA {
9130    pub const ENCODED_LEN: usize = 4usize;
9131    pub const DEFAULT: Self = Self {
9132        command: MavCmd::DEFAULT,
9133        target_system: 0_u8,
9134        target_component: 0_u8,
9135    };
9136    #[cfg(feature = "arbitrary")]
9137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9138        use arbitrary::{Arbitrary, Unstructured};
9139        let mut buf = [0u8; 1024];
9140        rng.fill_bytes(&mut buf);
9141        let mut unstructured = Unstructured::new(&buf);
9142        Self::arbitrary(&mut unstructured).unwrap_or_default()
9143    }
9144}
9145impl Default for COMMAND_CANCEL_DATA {
9146    fn default() -> Self {
9147        Self::DEFAULT.clone()
9148    }
9149}
9150impl MessageData for COMMAND_CANCEL_DATA {
9151    type Message = MavMessage;
9152    const ID: u32 = 80u32;
9153    const NAME: &'static str = "COMMAND_CANCEL";
9154    const EXTRA_CRC: u8 = 14u8;
9155    const ENCODED_LEN: usize = 4usize;
9156    fn deser(
9157        _version: MavlinkVersion,
9158        __input: &[u8],
9159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9160        let avail_len = __input.len();
9161        let mut payload_buf = [0; Self::ENCODED_LEN];
9162        let mut buf = if avail_len < Self::ENCODED_LEN {
9163            payload_buf[0..avail_len].copy_from_slice(__input);
9164            Bytes::new(&payload_buf)
9165        } else {
9166            Bytes::new(__input)
9167        };
9168        let mut __struct = Self::default();
9169        let tmp = buf.get_u16_le();
9170        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9171            ::mavlink_core::error::ParserError::InvalidEnum {
9172                enum_type: "MavCmd",
9173                value: tmp as u32,
9174            },
9175        )?;
9176        __struct.target_system = buf.get_u8();
9177        __struct.target_component = buf.get_u8();
9178        Ok(__struct)
9179    }
9180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9181        let mut __tmp = BytesMut::new(bytes);
9182        #[allow(clippy::absurd_extreme_comparisons)]
9183        #[allow(unused_comparisons)]
9184        if __tmp.remaining() < Self::ENCODED_LEN {
9185            panic!(
9186                "buffer is too small (need {} bytes, but got {})",
9187                Self::ENCODED_LEN,
9188                __tmp.remaining(),
9189            )
9190        }
9191        __tmp.put_u16_le(self.command as u16);
9192        __tmp.put_u8(self.target_system);
9193        __tmp.put_u8(self.target_component);
9194        if matches!(version, MavlinkVersion::V2) {
9195            let len = __tmp.len();
9196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9197        } else {
9198            __tmp.len()
9199        }
9200    }
9201}
9202#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9203#[doc = ""]
9204#[doc = "ID: 75"]
9205#[derive(Debug, Clone, PartialEq)]
9206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9208#[cfg_attr(feature = "ts", derive(TS))]
9209#[cfg_attr(feature = "ts", ts(export))]
9210pub struct COMMAND_INT_DATA {
9211    #[doc = "PARAM1, see MAV_CMD enum"]
9212    pub param1: f32,
9213    #[doc = "PARAM2, see MAV_CMD enum"]
9214    pub param2: f32,
9215    #[doc = "PARAM3, see MAV_CMD enum"]
9216    pub param3: f32,
9217    #[doc = "PARAM4, see MAV_CMD enum"]
9218    pub param4: f32,
9219    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9220    pub x: i32,
9221    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9222    pub y: i32,
9223    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9224    pub z: f32,
9225    #[doc = "The scheduled action for the mission item."]
9226    pub command: MavCmd,
9227    #[doc = "System ID"]
9228    pub target_system: u8,
9229    #[doc = "Component ID"]
9230    pub target_component: u8,
9231    #[doc = "The coordinate system of the COMMAND."]
9232    pub frame: MavFrame,
9233    #[doc = "Not used."]
9234    pub current: u8,
9235    #[doc = "Not used (set 0)."]
9236    pub autocontinue: u8,
9237}
9238impl COMMAND_INT_DATA {
9239    pub const ENCODED_LEN: usize = 35usize;
9240    pub const DEFAULT: Self = Self {
9241        param1: 0.0_f32,
9242        param2: 0.0_f32,
9243        param3: 0.0_f32,
9244        param4: 0.0_f32,
9245        x: 0_i32,
9246        y: 0_i32,
9247        z: 0.0_f32,
9248        command: MavCmd::DEFAULT,
9249        target_system: 0_u8,
9250        target_component: 0_u8,
9251        frame: MavFrame::DEFAULT,
9252        current: 0_u8,
9253        autocontinue: 0_u8,
9254    };
9255    #[cfg(feature = "arbitrary")]
9256    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9257        use arbitrary::{Arbitrary, Unstructured};
9258        let mut buf = [0u8; 1024];
9259        rng.fill_bytes(&mut buf);
9260        let mut unstructured = Unstructured::new(&buf);
9261        Self::arbitrary(&mut unstructured).unwrap_or_default()
9262    }
9263}
9264impl Default for COMMAND_INT_DATA {
9265    fn default() -> Self {
9266        Self::DEFAULT.clone()
9267    }
9268}
9269impl MessageData for COMMAND_INT_DATA {
9270    type Message = MavMessage;
9271    const ID: u32 = 75u32;
9272    const NAME: &'static str = "COMMAND_INT";
9273    const EXTRA_CRC: u8 = 158u8;
9274    const ENCODED_LEN: usize = 35usize;
9275    fn deser(
9276        _version: MavlinkVersion,
9277        __input: &[u8],
9278    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9279        let avail_len = __input.len();
9280        let mut payload_buf = [0; Self::ENCODED_LEN];
9281        let mut buf = if avail_len < Self::ENCODED_LEN {
9282            payload_buf[0..avail_len].copy_from_slice(__input);
9283            Bytes::new(&payload_buf)
9284        } else {
9285            Bytes::new(__input)
9286        };
9287        let mut __struct = Self::default();
9288        __struct.param1 = buf.get_f32_le();
9289        __struct.param2 = buf.get_f32_le();
9290        __struct.param3 = buf.get_f32_le();
9291        __struct.param4 = buf.get_f32_le();
9292        __struct.x = buf.get_i32_le();
9293        __struct.y = buf.get_i32_le();
9294        __struct.z = buf.get_f32_le();
9295        let tmp = buf.get_u16_le();
9296        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9297            ::mavlink_core::error::ParserError::InvalidEnum {
9298                enum_type: "MavCmd",
9299                value: tmp as u32,
9300            },
9301        )?;
9302        __struct.target_system = buf.get_u8();
9303        __struct.target_component = buf.get_u8();
9304        let tmp = buf.get_u8();
9305        __struct.frame =
9306            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9307                enum_type: "MavFrame",
9308                value: tmp as u32,
9309            })?;
9310        __struct.current = buf.get_u8();
9311        __struct.autocontinue = buf.get_u8();
9312        Ok(__struct)
9313    }
9314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9315        let mut __tmp = BytesMut::new(bytes);
9316        #[allow(clippy::absurd_extreme_comparisons)]
9317        #[allow(unused_comparisons)]
9318        if __tmp.remaining() < Self::ENCODED_LEN {
9319            panic!(
9320                "buffer is too small (need {} bytes, but got {})",
9321                Self::ENCODED_LEN,
9322                __tmp.remaining(),
9323            )
9324        }
9325        __tmp.put_f32_le(self.param1);
9326        __tmp.put_f32_le(self.param2);
9327        __tmp.put_f32_le(self.param3);
9328        __tmp.put_f32_le(self.param4);
9329        __tmp.put_i32_le(self.x);
9330        __tmp.put_i32_le(self.y);
9331        __tmp.put_f32_le(self.z);
9332        __tmp.put_u16_le(self.command as u16);
9333        __tmp.put_u8(self.target_system);
9334        __tmp.put_u8(self.target_component);
9335        __tmp.put_u8(self.frame as u8);
9336        __tmp.put_u8(self.current);
9337        __tmp.put_u8(self.autocontinue);
9338        if matches!(version, MavlinkVersion::V2) {
9339            let len = __tmp.len();
9340            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9341        } else {
9342            __tmp.len()
9343        }
9344    }
9345}
9346#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9347#[doc = ""]
9348#[doc = "ID: 76"]
9349#[derive(Debug, Clone, PartialEq)]
9350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9352#[cfg_attr(feature = "ts", derive(TS))]
9353#[cfg_attr(feature = "ts", ts(export))]
9354pub struct COMMAND_LONG_DATA {
9355    #[doc = "Parameter 1 (for the specific command)."]
9356    pub param1: f32,
9357    #[doc = "Parameter 2 (for the specific command)."]
9358    pub param2: f32,
9359    #[doc = "Parameter 3 (for the specific command)."]
9360    pub param3: f32,
9361    #[doc = "Parameter 4 (for the specific command)."]
9362    pub param4: f32,
9363    #[doc = "Parameter 5 (for the specific command)."]
9364    pub param5: f32,
9365    #[doc = "Parameter 6 (for the specific command)."]
9366    pub param6: f32,
9367    #[doc = "Parameter 7 (for the specific command)."]
9368    pub param7: f32,
9369    #[doc = "Command ID (of command to send)."]
9370    pub command: MavCmd,
9371    #[doc = "System which should execute the command"]
9372    pub target_system: u8,
9373    #[doc = "Component which should execute the command, 0 for all components"]
9374    pub target_component: u8,
9375    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9376    pub confirmation: u8,
9377}
9378impl COMMAND_LONG_DATA {
9379    pub const ENCODED_LEN: usize = 33usize;
9380    pub const DEFAULT: Self = Self {
9381        param1: 0.0_f32,
9382        param2: 0.0_f32,
9383        param3: 0.0_f32,
9384        param4: 0.0_f32,
9385        param5: 0.0_f32,
9386        param6: 0.0_f32,
9387        param7: 0.0_f32,
9388        command: MavCmd::DEFAULT,
9389        target_system: 0_u8,
9390        target_component: 0_u8,
9391        confirmation: 0_u8,
9392    };
9393    #[cfg(feature = "arbitrary")]
9394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9395        use arbitrary::{Arbitrary, Unstructured};
9396        let mut buf = [0u8; 1024];
9397        rng.fill_bytes(&mut buf);
9398        let mut unstructured = Unstructured::new(&buf);
9399        Self::arbitrary(&mut unstructured).unwrap_or_default()
9400    }
9401}
9402impl Default for COMMAND_LONG_DATA {
9403    fn default() -> Self {
9404        Self::DEFAULT.clone()
9405    }
9406}
9407impl MessageData for COMMAND_LONG_DATA {
9408    type Message = MavMessage;
9409    const ID: u32 = 76u32;
9410    const NAME: &'static str = "COMMAND_LONG";
9411    const EXTRA_CRC: u8 = 152u8;
9412    const ENCODED_LEN: usize = 33usize;
9413    fn deser(
9414        _version: MavlinkVersion,
9415        __input: &[u8],
9416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9417        let avail_len = __input.len();
9418        let mut payload_buf = [0; Self::ENCODED_LEN];
9419        let mut buf = if avail_len < Self::ENCODED_LEN {
9420            payload_buf[0..avail_len].copy_from_slice(__input);
9421            Bytes::new(&payload_buf)
9422        } else {
9423            Bytes::new(__input)
9424        };
9425        let mut __struct = Self::default();
9426        __struct.param1 = buf.get_f32_le();
9427        __struct.param2 = buf.get_f32_le();
9428        __struct.param3 = buf.get_f32_le();
9429        __struct.param4 = buf.get_f32_le();
9430        __struct.param5 = buf.get_f32_le();
9431        __struct.param6 = buf.get_f32_le();
9432        __struct.param7 = buf.get_f32_le();
9433        let tmp = buf.get_u16_le();
9434        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9435            ::mavlink_core::error::ParserError::InvalidEnum {
9436                enum_type: "MavCmd",
9437                value: tmp as u32,
9438            },
9439        )?;
9440        __struct.target_system = buf.get_u8();
9441        __struct.target_component = buf.get_u8();
9442        __struct.confirmation = buf.get_u8();
9443        Ok(__struct)
9444    }
9445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9446        let mut __tmp = BytesMut::new(bytes);
9447        #[allow(clippy::absurd_extreme_comparisons)]
9448        #[allow(unused_comparisons)]
9449        if __tmp.remaining() < Self::ENCODED_LEN {
9450            panic!(
9451                "buffer is too small (need {} bytes, but got {})",
9452                Self::ENCODED_LEN,
9453                __tmp.remaining(),
9454            )
9455        }
9456        __tmp.put_f32_le(self.param1);
9457        __tmp.put_f32_le(self.param2);
9458        __tmp.put_f32_le(self.param3);
9459        __tmp.put_f32_le(self.param4);
9460        __tmp.put_f32_le(self.param5);
9461        __tmp.put_f32_le(self.param6);
9462        __tmp.put_f32_le(self.param7);
9463        __tmp.put_u16_le(self.command as u16);
9464        __tmp.put_u8(self.target_system);
9465        __tmp.put_u8(self.target_component);
9466        __tmp.put_u8(self.confirmation);
9467        if matches!(version, MavlinkVersion::V2) {
9468            let len = __tmp.len();
9469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9470        } else {
9471            __tmp.len()
9472        }
9473    }
9474}
9475#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9476#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9477#[doc = ""]
9478#[doc = "ID: 395"]
9479#[derive(Debug, Clone, PartialEq)]
9480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9482#[cfg_attr(feature = "ts", derive(TS))]
9483#[cfg_attr(feature = "ts", ts(export))]
9484pub struct COMPONENT_INFORMATION_DATA {
9485    #[doc = "Timestamp (time since system boot)."]
9486    pub time_boot_ms: u32,
9487    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9488    pub general_metadata_file_crc: u32,
9489    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9490    pub peripherals_metadata_file_crc: u32,
9491    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9492    #[cfg_attr(
9493        feature = "serde",
9494        serde(
9495            serialize_with = "crate::nulstr::serialize::<_, 100>",
9496            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9497        )
9498    )]
9499    #[cfg_attr(feature = "ts", ts(type = "string"))]
9500    pub general_metadata_uri: [u8; 100],
9501    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9502    #[cfg_attr(
9503        feature = "serde",
9504        serde(
9505            serialize_with = "crate::nulstr::serialize::<_, 100>",
9506            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9507        )
9508    )]
9509    #[cfg_attr(feature = "ts", ts(type = "string"))]
9510    pub peripherals_metadata_uri: [u8; 100],
9511}
9512impl COMPONENT_INFORMATION_DATA {
9513    pub const ENCODED_LEN: usize = 212usize;
9514    pub const DEFAULT: Self = Self {
9515        time_boot_ms: 0_u32,
9516        general_metadata_file_crc: 0_u32,
9517        peripherals_metadata_file_crc: 0_u32,
9518        general_metadata_uri: [0_u8; 100usize],
9519        peripherals_metadata_uri: [0_u8; 100usize],
9520    };
9521    #[cfg(feature = "arbitrary")]
9522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9523        use arbitrary::{Arbitrary, Unstructured};
9524        let mut buf = [0u8; 1024];
9525        rng.fill_bytes(&mut buf);
9526        let mut unstructured = Unstructured::new(&buf);
9527        Self::arbitrary(&mut unstructured).unwrap_or_default()
9528    }
9529}
9530impl Default for COMPONENT_INFORMATION_DATA {
9531    fn default() -> Self {
9532        Self::DEFAULT.clone()
9533    }
9534}
9535impl MessageData for COMPONENT_INFORMATION_DATA {
9536    type Message = MavMessage;
9537    const ID: u32 = 395u32;
9538    const NAME: &'static str = "COMPONENT_INFORMATION";
9539    const EXTRA_CRC: u8 = 0u8;
9540    const ENCODED_LEN: usize = 212usize;
9541    fn deser(
9542        _version: MavlinkVersion,
9543        __input: &[u8],
9544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9545        let avail_len = __input.len();
9546        let mut payload_buf = [0; Self::ENCODED_LEN];
9547        let mut buf = if avail_len < Self::ENCODED_LEN {
9548            payload_buf[0..avail_len].copy_from_slice(__input);
9549            Bytes::new(&payload_buf)
9550        } else {
9551            Bytes::new(__input)
9552        };
9553        let mut __struct = Self::default();
9554        __struct.time_boot_ms = buf.get_u32_le();
9555        __struct.general_metadata_file_crc = buf.get_u32_le();
9556        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9557        for v in &mut __struct.general_metadata_uri {
9558            let val = buf.get_u8();
9559            *v = val;
9560        }
9561        for v in &mut __struct.peripherals_metadata_uri {
9562            let val = buf.get_u8();
9563            *v = val;
9564        }
9565        Ok(__struct)
9566    }
9567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9568        let mut __tmp = BytesMut::new(bytes);
9569        #[allow(clippy::absurd_extreme_comparisons)]
9570        #[allow(unused_comparisons)]
9571        if __tmp.remaining() < Self::ENCODED_LEN {
9572            panic!(
9573                "buffer is too small (need {} bytes, but got {})",
9574                Self::ENCODED_LEN,
9575                __tmp.remaining(),
9576            )
9577        }
9578        __tmp.put_u32_le(self.time_boot_ms);
9579        __tmp.put_u32_le(self.general_metadata_file_crc);
9580        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9581        for val in &self.general_metadata_uri {
9582            __tmp.put_u8(*val);
9583        }
9584        for val in &self.peripherals_metadata_uri {
9585            __tmp.put_u8(*val);
9586        }
9587        if matches!(version, MavlinkVersion::V2) {
9588            let len = __tmp.len();
9589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9590        } else {
9591            __tmp.len()
9592        }
9593    }
9594}
9595#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9596#[doc = ""]
9597#[doc = "ID: 396"]
9598#[derive(Debug, Clone, PartialEq)]
9599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9601#[cfg_attr(feature = "ts", derive(TS))]
9602#[cfg_attr(feature = "ts", ts(export))]
9603pub struct COMPONENT_INFORMATION_BASIC_DATA {
9604    #[doc = "Component capability flags"]
9605    pub capabilities: MavProtocolCapability,
9606    #[doc = "Timestamp (time since system boot)."]
9607    pub time_boot_ms: u32,
9608    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9609    pub time_manufacture_s: u32,
9610    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9611    #[cfg_attr(
9612        feature = "serde",
9613        serde(
9614            serialize_with = "crate::nulstr::serialize::<_, 32>",
9615            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
9616        )
9617    )]
9618    #[cfg_attr(feature = "ts", ts(type = "string"))]
9619    pub vendor_name: [u8; 32],
9620    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9621    #[cfg_attr(
9622        feature = "serde",
9623        serde(
9624            serialize_with = "crate::nulstr::serialize::<_, 32>",
9625            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
9626        )
9627    )]
9628    #[cfg_attr(feature = "ts", ts(type = "string"))]
9629    pub model_name: [u8; 32],
9630    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9631    #[cfg_attr(
9632        feature = "serde",
9633        serde(
9634            serialize_with = "crate::nulstr::serialize::<_, 24>",
9635            deserialize_with = "crate::nulstr::deserialize::<_, 24>"
9636        )
9637    )]
9638    #[cfg_attr(feature = "ts", ts(type = "string"))]
9639    pub software_version: [u8; 24],
9640    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9641    #[cfg_attr(
9642        feature = "serde",
9643        serde(
9644            serialize_with = "crate::nulstr::serialize::<_, 24>",
9645            deserialize_with = "crate::nulstr::deserialize::<_, 24>"
9646        )
9647    )]
9648    #[cfg_attr(feature = "ts", ts(type = "string"))]
9649    pub hardware_version: [u8; 24],
9650    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9651    #[cfg_attr(
9652        feature = "serde",
9653        serde(
9654            serialize_with = "crate::nulstr::serialize::<_, 32>",
9655            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
9656        )
9657    )]
9658    #[cfg_attr(feature = "ts", ts(type = "string"))]
9659    pub serial_number: [u8; 32],
9660}
9661impl COMPONENT_INFORMATION_BASIC_DATA {
9662    pub const ENCODED_LEN: usize = 160usize;
9663    pub const DEFAULT: Self = Self {
9664        capabilities: MavProtocolCapability::DEFAULT,
9665        time_boot_ms: 0_u32,
9666        time_manufacture_s: 0_u32,
9667        vendor_name: [0_u8; 32usize],
9668        model_name: [0_u8; 32usize],
9669        software_version: [0_u8; 24usize],
9670        hardware_version: [0_u8; 24usize],
9671        serial_number: [0_u8; 32usize],
9672    };
9673    #[cfg(feature = "arbitrary")]
9674    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9675        use arbitrary::{Arbitrary, Unstructured};
9676        let mut buf = [0u8; 1024];
9677        rng.fill_bytes(&mut buf);
9678        let mut unstructured = Unstructured::new(&buf);
9679        Self::arbitrary(&mut unstructured).unwrap_or_default()
9680    }
9681}
9682impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9683    fn default() -> Self {
9684        Self::DEFAULT.clone()
9685    }
9686}
9687impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9688    type Message = MavMessage;
9689    const ID: u32 = 396u32;
9690    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9691    const EXTRA_CRC: u8 = 50u8;
9692    const ENCODED_LEN: usize = 160usize;
9693    fn deser(
9694        _version: MavlinkVersion,
9695        __input: &[u8],
9696    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9697        let avail_len = __input.len();
9698        let mut payload_buf = [0; Self::ENCODED_LEN];
9699        let mut buf = if avail_len < Self::ENCODED_LEN {
9700            payload_buf[0..avail_len].copy_from_slice(__input);
9701            Bytes::new(&payload_buf)
9702        } else {
9703            Bytes::new(__input)
9704        };
9705        let mut __struct = Self::default();
9706        let tmp = buf.get_u64_le();
9707        __struct.capabilities = MavProtocolCapability::from_bits(
9708            tmp & MavProtocolCapability::all().bits(),
9709        )
9710        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9711            flag_type: "MavProtocolCapability",
9712            value: tmp as u32,
9713        })?;
9714        __struct.time_boot_ms = buf.get_u32_le();
9715        __struct.time_manufacture_s = buf.get_u32_le();
9716        for v in &mut __struct.vendor_name {
9717            let val = buf.get_u8();
9718            *v = val;
9719        }
9720        for v in &mut __struct.model_name {
9721            let val = buf.get_u8();
9722            *v = val;
9723        }
9724        for v in &mut __struct.software_version {
9725            let val = buf.get_u8();
9726            *v = val;
9727        }
9728        for v in &mut __struct.hardware_version {
9729            let val = buf.get_u8();
9730            *v = val;
9731        }
9732        for v in &mut __struct.serial_number {
9733            let val = buf.get_u8();
9734            *v = val;
9735        }
9736        Ok(__struct)
9737    }
9738    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9739        let mut __tmp = BytesMut::new(bytes);
9740        #[allow(clippy::absurd_extreme_comparisons)]
9741        #[allow(unused_comparisons)]
9742        if __tmp.remaining() < Self::ENCODED_LEN {
9743            panic!(
9744                "buffer is too small (need {} bytes, but got {})",
9745                Self::ENCODED_LEN,
9746                __tmp.remaining(),
9747            )
9748        }
9749        __tmp.put_u64_le(self.capabilities.bits());
9750        __tmp.put_u32_le(self.time_boot_ms);
9751        __tmp.put_u32_le(self.time_manufacture_s);
9752        for val in &self.vendor_name {
9753            __tmp.put_u8(*val);
9754        }
9755        for val in &self.model_name {
9756            __tmp.put_u8(*val);
9757        }
9758        for val in &self.software_version {
9759            __tmp.put_u8(*val);
9760        }
9761        for val in &self.hardware_version {
9762            __tmp.put_u8(*val);
9763        }
9764        for val in &self.serial_number {
9765            __tmp.put_u8(*val);
9766        }
9767        if matches!(version, MavlinkVersion::V2) {
9768            let len = __tmp.len();
9769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9770        } else {
9771            __tmp.len()
9772        }
9773    }
9774}
9775#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9776#[doc = ""]
9777#[doc = "ID: 397"]
9778#[derive(Debug, Clone, PartialEq)]
9779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9781#[cfg_attr(feature = "ts", derive(TS))]
9782#[cfg_attr(feature = "ts", ts(export))]
9783pub struct COMPONENT_METADATA_DATA {
9784    #[doc = "Timestamp (time since system boot)."]
9785    pub time_boot_ms: u32,
9786    #[doc = "CRC32 of the general metadata file."]
9787    pub file_crc: u32,
9788    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9789    #[cfg_attr(
9790        feature = "serde",
9791        serde(
9792            serialize_with = "crate::nulstr::serialize::<_, 100>",
9793            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9794        )
9795    )]
9796    #[cfg_attr(feature = "ts", ts(type = "string"))]
9797    pub uri: [u8; 100],
9798}
9799impl COMPONENT_METADATA_DATA {
9800    pub const ENCODED_LEN: usize = 108usize;
9801    pub const DEFAULT: Self = Self {
9802        time_boot_ms: 0_u32,
9803        file_crc: 0_u32,
9804        uri: [0_u8; 100usize],
9805    };
9806    #[cfg(feature = "arbitrary")]
9807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9808        use arbitrary::{Arbitrary, Unstructured};
9809        let mut buf = [0u8; 1024];
9810        rng.fill_bytes(&mut buf);
9811        let mut unstructured = Unstructured::new(&buf);
9812        Self::arbitrary(&mut unstructured).unwrap_or_default()
9813    }
9814}
9815impl Default for COMPONENT_METADATA_DATA {
9816    fn default() -> Self {
9817        Self::DEFAULT.clone()
9818    }
9819}
9820impl MessageData for COMPONENT_METADATA_DATA {
9821    type Message = MavMessage;
9822    const ID: u32 = 397u32;
9823    const NAME: &'static str = "COMPONENT_METADATA";
9824    const EXTRA_CRC: u8 = 182u8;
9825    const ENCODED_LEN: usize = 108usize;
9826    fn deser(
9827        _version: MavlinkVersion,
9828        __input: &[u8],
9829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9830        let avail_len = __input.len();
9831        let mut payload_buf = [0; Self::ENCODED_LEN];
9832        let mut buf = if avail_len < Self::ENCODED_LEN {
9833            payload_buf[0..avail_len].copy_from_slice(__input);
9834            Bytes::new(&payload_buf)
9835        } else {
9836            Bytes::new(__input)
9837        };
9838        let mut __struct = Self::default();
9839        __struct.time_boot_ms = buf.get_u32_le();
9840        __struct.file_crc = buf.get_u32_le();
9841        for v in &mut __struct.uri {
9842            let val = buf.get_u8();
9843            *v = val;
9844        }
9845        Ok(__struct)
9846    }
9847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9848        let mut __tmp = BytesMut::new(bytes);
9849        #[allow(clippy::absurd_extreme_comparisons)]
9850        #[allow(unused_comparisons)]
9851        if __tmp.remaining() < Self::ENCODED_LEN {
9852            panic!(
9853                "buffer is too small (need {} bytes, but got {})",
9854                Self::ENCODED_LEN,
9855                __tmp.remaining(),
9856            )
9857        }
9858        __tmp.put_u32_le(self.time_boot_ms);
9859        __tmp.put_u32_le(self.file_crc);
9860        for val in &self.uri {
9861            __tmp.put_u8(*val);
9862        }
9863        if matches!(version, MavlinkVersion::V2) {
9864            let len = __tmp.len();
9865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9866        } else {
9867            __tmp.len()
9868        }
9869    }
9870}
9871#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9872#[doc = ""]
9873#[doc = "ID: 146"]
9874#[derive(Debug, Clone, PartialEq)]
9875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9877#[cfg_attr(feature = "ts", derive(TS))]
9878#[cfg_attr(feature = "ts", ts(export))]
9879pub struct CONTROL_SYSTEM_STATE_DATA {
9880    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9881    pub time_usec: u64,
9882    #[doc = "X acceleration in body frame"]
9883    pub x_acc: f32,
9884    #[doc = "Y acceleration in body frame"]
9885    pub y_acc: f32,
9886    #[doc = "Z acceleration in body frame"]
9887    pub z_acc: f32,
9888    #[doc = "X velocity in body frame"]
9889    pub x_vel: f32,
9890    #[doc = "Y velocity in body frame"]
9891    pub y_vel: f32,
9892    #[doc = "Z velocity in body frame"]
9893    pub z_vel: f32,
9894    #[doc = "X position in local frame"]
9895    pub x_pos: f32,
9896    #[doc = "Y position in local frame"]
9897    pub y_pos: f32,
9898    #[doc = "Z position in local frame"]
9899    pub z_pos: f32,
9900    #[doc = "Airspeed, set to -1 if unknown"]
9901    pub airspeed: f32,
9902    #[doc = "Variance of body velocity estimate"]
9903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9904    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9905    pub vel_variance: [f32; 3],
9906    #[doc = "Variance in local position"]
9907    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9908    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9909    pub pos_variance: [f32; 3],
9910    #[doc = "The attitude, represented as Quaternion"]
9911    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9912    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9913    pub q: [f32; 4],
9914    #[doc = "Angular rate in roll axis"]
9915    pub roll_rate: f32,
9916    #[doc = "Angular rate in pitch axis"]
9917    pub pitch_rate: f32,
9918    #[doc = "Angular rate in yaw axis"]
9919    pub yaw_rate: f32,
9920}
9921impl CONTROL_SYSTEM_STATE_DATA {
9922    pub const ENCODED_LEN: usize = 100usize;
9923    pub const DEFAULT: Self = Self {
9924        time_usec: 0_u64,
9925        x_acc: 0.0_f32,
9926        y_acc: 0.0_f32,
9927        z_acc: 0.0_f32,
9928        x_vel: 0.0_f32,
9929        y_vel: 0.0_f32,
9930        z_vel: 0.0_f32,
9931        x_pos: 0.0_f32,
9932        y_pos: 0.0_f32,
9933        z_pos: 0.0_f32,
9934        airspeed: 0.0_f32,
9935        vel_variance: [0.0_f32; 3usize],
9936        pos_variance: [0.0_f32; 3usize],
9937        q: [0.0_f32; 4usize],
9938        roll_rate: 0.0_f32,
9939        pitch_rate: 0.0_f32,
9940        yaw_rate: 0.0_f32,
9941    };
9942    #[cfg(feature = "arbitrary")]
9943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9944        use arbitrary::{Arbitrary, Unstructured};
9945        let mut buf = [0u8; 1024];
9946        rng.fill_bytes(&mut buf);
9947        let mut unstructured = Unstructured::new(&buf);
9948        Self::arbitrary(&mut unstructured).unwrap_or_default()
9949    }
9950}
9951impl Default for CONTROL_SYSTEM_STATE_DATA {
9952    fn default() -> Self {
9953        Self::DEFAULT.clone()
9954    }
9955}
9956impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9957    type Message = MavMessage;
9958    const ID: u32 = 146u32;
9959    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9960    const EXTRA_CRC: u8 = 103u8;
9961    const ENCODED_LEN: usize = 100usize;
9962    fn deser(
9963        _version: MavlinkVersion,
9964        __input: &[u8],
9965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9966        let avail_len = __input.len();
9967        let mut payload_buf = [0; Self::ENCODED_LEN];
9968        let mut buf = if avail_len < Self::ENCODED_LEN {
9969            payload_buf[0..avail_len].copy_from_slice(__input);
9970            Bytes::new(&payload_buf)
9971        } else {
9972            Bytes::new(__input)
9973        };
9974        let mut __struct = Self::default();
9975        __struct.time_usec = buf.get_u64_le();
9976        __struct.x_acc = buf.get_f32_le();
9977        __struct.y_acc = buf.get_f32_le();
9978        __struct.z_acc = buf.get_f32_le();
9979        __struct.x_vel = buf.get_f32_le();
9980        __struct.y_vel = buf.get_f32_le();
9981        __struct.z_vel = buf.get_f32_le();
9982        __struct.x_pos = buf.get_f32_le();
9983        __struct.y_pos = buf.get_f32_le();
9984        __struct.z_pos = buf.get_f32_le();
9985        __struct.airspeed = buf.get_f32_le();
9986        for v in &mut __struct.vel_variance {
9987            let val = buf.get_f32_le();
9988            *v = val;
9989        }
9990        for v in &mut __struct.pos_variance {
9991            let val = buf.get_f32_le();
9992            *v = val;
9993        }
9994        for v in &mut __struct.q {
9995            let val = buf.get_f32_le();
9996            *v = val;
9997        }
9998        __struct.roll_rate = buf.get_f32_le();
9999        __struct.pitch_rate = buf.get_f32_le();
10000        __struct.yaw_rate = buf.get_f32_le();
10001        Ok(__struct)
10002    }
10003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10004        let mut __tmp = BytesMut::new(bytes);
10005        #[allow(clippy::absurd_extreme_comparisons)]
10006        #[allow(unused_comparisons)]
10007        if __tmp.remaining() < Self::ENCODED_LEN {
10008            panic!(
10009                "buffer is too small (need {} bytes, but got {})",
10010                Self::ENCODED_LEN,
10011                __tmp.remaining(),
10012            )
10013        }
10014        __tmp.put_u64_le(self.time_usec);
10015        __tmp.put_f32_le(self.x_acc);
10016        __tmp.put_f32_le(self.y_acc);
10017        __tmp.put_f32_le(self.z_acc);
10018        __tmp.put_f32_le(self.x_vel);
10019        __tmp.put_f32_le(self.y_vel);
10020        __tmp.put_f32_le(self.z_vel);
10021        __tmp.put_f32_le(self.x_pos);
10022        __tmp.put_f32_le(self.y_pos);
10023        __tmp.put_f32_le(self.z_pos);
10024        __tmp.put_f32_le(self.airspeed);
10025        for val in &self.vel_variance {
10026            __tmp.put_f32_le(*val);
10027        }
10028        for val in &self.pos_variance {
10029            __tmp.put_f32_le(*val);
10030        }
10031        for val in &self.q {
10032            __tmp.put_f32_le(*val);
10033        }
10034        __tmp.put_f32_le(self.roll_rate);
10035        __tmp.put_f32_le(self.pitch_rate);
10036        __tmp.put_f32_le(self.yaw_rate);
10037        if matches!(version, MavlinkVersion::V2) {
10038            let len = __tmp.len();
10039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10040        } else {
10041            __tmp.len()
10042        }
10043    }
10044}
10045#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10046#[doc = ""]
10047#[doc = "ID: 411"]
10048#[derive(Debug, Clone, PartialEq)]
10049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10051#[cfg_attr(feature = "ts", derive(TS))]
10052#[cfg_attr(feature = "ts", ts(export))]
10053pub struct CURRENT_EVENT_SEQUENCE_DATA {
10054    #[doc = "Sequence number."]
10055    pub sequence: u16,
10056    #[doc = "Flag bitset."]
10057    pub flags: MavEventCurrentSequenceFlags,
10058}
10059impl CURRENT_EVENT_SEQUENCE_DATA {
10060    pub const ENCODED_LEN: usize = 3usize;
10061    pub const DEFAULT: Self = Self {
10062        sequence: 0_u16,
10063        flags: MavEventCurrentSequenceFlags::DEFAULT,
10064    };
10065    #[cfg(feature = "arbitrary")]
10066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10067        use arbitrary::{Arbitrary, Unstructured};
10068        let mut buf = [0u8; 1024];
10069        rng.fill_bytes(&mut buf);
10070        let mut unstructured = Unstructured::new(&buf);
10071        Self::arbitrary(&mut unstructured).unwrap_or_default()
10072    }
10073}
10074impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10075    fn default() -> Self {
10076        Self::DEFAULT.clone()
10077    }
10078}
10079impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10080    type Message = MavMessage;
10081    const ID: u32 = 411u32;
10082    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10083    const EXTRA_CRC: u8 = 106u8;
10084    const ENCODED_LEN: usize = 3usize;
10085    fn deser(
10086        _version: MavlinkVersion,
10087        __input: &[u8],
10088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10089        let avail_len = __input.len();
10090        let mut payload_buf = [0; Self::ENCODED_LEN];
10091        let mut buf = if avail_len < Self::ENCODED_LEN {
10092            payload_buf[0..avail_len].copy_from_slice(__input);
10093            Bytes::new(&payload_buf)
10094        } else {
10095            Bytes::new(__input)
10096        };
10097        let mut __struct = Self::default();
10098        __struct.sequence = buf.get_u16_le();
10099        let tmp = buf.get_u8();
10100        __struct.flags =
10101            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10102                enum_type: "MavEventCurrentSequenceFlags",
10103                value: tmp as u32,
10104            })?;
10105        Ok(__struct)
10106    }
10107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10108        let mut __tmp = BytesMut::new(bytes);
10109        #[allow(clippy::absurd_extreme_comparisons)]
10110        #[allow(unused_comparisons)]
10111        if __tmp.remaining() < Self::ENCODED_LEN {
10112            panic!(
10113                "buffer is too small (need {} bytes, but got {})",
10114                Self::ENCODED_LEN,
10115                __tmp.remaining(),
10116            )
10117        }
10118        __tmp.put_u16_le(self.sequence);
10119        __tmp.put_u8(self.flags as u8);
10120        if matches!(version, MavlinkVersion::V2) {
10121            let len = __tmp.len();
10122            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10123        } else {
10124            __tmp.len()
10125        }
10126    }
10127}
10128#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10129#[doc = ""]
10130#[doc = "ID: 436"]
10131#[derive(Debug, Clone, PartialEq)]
10132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10134#[cfg_attr(feature = "ts", derive(TS))]
10135#[cfg_attr(feature = "ts", ts(export))]
10136pub struct CURRENT_MODE_DATA {
10137    #[doc = "A bitfield for use for autopilot-specific flags"]
10138    pub custom_mode: u32,
10139    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10140    pub intended_custom_mode: u32,
10141    #[doc = "Standard mode."]
10142    pub standard_mode: MavStandardMode,
10143}
10144impl CURRENT_MODE_DATA {
10145    pub const ENCODED_LEN: usize = 9usize;
10146    pub const DEFAULT: Self = Self {
10147        custom_mode: 0_u32,
10148        intended_custom_mode: 0_u32,
10149        standard_mode: MavStandardMode::DEFAULT,
10150    };
10151    #[cfg(feature = "arbitrary")]
10152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10153        use arbitrary::{Arbitrary, Unstructured};
10154        let mut buf = [0u8; 1024];
10155        rng.fill_bytes(&mut buf);
10156        let mut unstructured = Unstructured::new(&buf);
10157        Self::arbitrary(&mut unstructured).unwrap_or_default()
10158    }
10159}
10160impl Default for CURRENT_MODE_DATA {
10161    fn default() -> Self {
10162        Self::DEFAULT.clone()
10163    }
10164}
10165impl MessageData for CURRENT_MODE_DATA {
10166    type Message = MavMessage;
10167    const ID: u32 = 436u32;
10168    const NAME: &'static str = "CURRENT_MODE";
10169    const EXTRA_CRC: u8 = 193u8;
10170    const ENCODED_LEN: usize = 9usize;
10171    fn deser(
10172        _version: MavlinkVersion,
10173        __input: &[u8],
10174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10175        let avail_len = __input.len();
10176        let mut payload_buf = [0; Self::ENCODED_LEN];
10177        let mut buf = if avail_len < Self::ENCODED_LEN {
10178            payload_buf[0..avail_len].copy_from_slice(__input);
10179            Bytes::new(&payload_buf)
10180        } else {
10181            Bytes::new(__input)
10182        };
10183        let mut __struct = Self::default();
10184        __struct.custom_mode = buf.get_u32_le();
10185        __struct.intended_custom_mode = buf.get_u32_le();
10186        let tmp = buf.get_u8();
10187        __struct.standard_mode =
10188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10189                enum_type: "MavStandardMode",
10190                value: tmp as u32,
10191            })?;
10192        Ok(__struct)
10193    }
10194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10195        let mut __tmp = BytesMut::new(bytes);
10196        #[allow(clippy::absurd_extreme_comparisons)]
10197        #[allow(unused_comparisons)]
10198        if __tmp.remaining() < Self::ENCODED_LEN {
10199            panic!(
10200                "buffer is too small (need {} bytes, but got {})",
10201                Self::ENCODED_LEN,
10202                __tmp.remaining(),
10203            )
10204        }
10205        __tmp.put_u32_le(self.custom_mode);
10206        __tmp.put_u32_le(self.intended_custom_mode);
10207        __tmp.put_u8(self.standard_mode as u8);
10208        if matches!(version, MavlinkVersion::V2) {
10209            let len = __tmp.len();
10210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10211        } else {
10212            __tmp.len()
10213        }
10214    }
10215}
10216#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10217#[doc = "Data stream status information."]
10218#[doc = ""]
10219#[doc = "ID: 67"]
10220#[derive(Debug, Clone, PartialEq)]
10221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10223#[cfg_attr(feature = "ts", derive(TS))]
10224#[cfg_attr(feature = "ts", ts(export))]
10225pub struct DATA_STREAM_DATA {
10226    #[doc = "The message rate"]
10227    pub message_rate: u16,
10228    #[doc = "The ID of the requested data stream"]
10229    pub stream_id: u8,
10230    #[doc = "1 stream is enabled, 0 stream is stopped."]
10231    pub on_off: u8,
10232}
10233impl DATA_STREAM_DATA {
10234    pub const ENCODED_LEN: usize = 4usize;
10235    pub const DEFAULT: Self = Self {
10236        message_rate: 0_u16,
10237        stream_id: 0_u8,
10238        on_off: 0_u8,
10239    };
10240    #[cfg(feature = "arbitrary")]
10241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10242        use arbitrary::{Arbitrary, Unstructured};
10243        let mut buf = [0u8; 1024];
10244        rng.fill_bytes(&mut buf);
10245        let mut unstructured = Unstructured::new(&buf);
10246        Self::arbitrary(&mut unstructured).unwrap_or_default()
10247    }
10248}
10249impl Default for DATA_STREAM_DATA {
10250    fn default() -> Self {
10251        Self::DEFAULT.clone()
10252    }
10253}
10254impl MessageData for DATA_STREAM_DATA {
10255    type Message = MavMessage;
10256    const ID: u32 = 67u32;
10257    const NAME: &'static str = "DATA_STREAM";
10258    const EXTRA_CRC: u8 = 21u8;
10259    const ENCODED_LEN: usize = 4usize;
10260    fn deser(
10261        _version: MavlinkVersion,
10262        __input: &[u8],
10263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10264        let avail_len = __input.len();
10265        let mut payload_buf = [0; Self::ENCODED_LEN];
10266        let mut buf = if avail_len < Self::ENCODED_LEN {
10267            payload_buf[0..avail_len].copy_from_slice(__input);
10268            Bytes::new(&payload_buf)
10269        } else {
10270            Bytes::new(__input)
10271        };
10272        let mut __struct = Self::default();
10273        __struct.message_rate = buf.get_u16_le();
10274        __struct.stream_id = buf.get_u8();
10275        __struct.on_off = buf.get_u8();
10276        Ok(__struct)
10277    }
10278    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10279        let mut __tmp = BytesMut::new(bytes);
10280        #[allow(clippy::absurd_extreme_comparisons)]
10281        #[allow(unused_comparisons)]
10282        if __tmp.remaining() < Self::ENCODED_LEN {
10283            panic!(
10284                "buffer is too small (need {} bytes, but got {})",
10285                Self::ENCODED_LEN,
10286                __tmp.remaining(),
10287            )
10288        }
10289        __tmp.put_u16_le(self.message_rate);
10290        __tmp.put_u8(self.stream_id);
10291        __tmp.put_u8(self.on_off);
10292        if matches!(version, MavlinkVersion::V2) {
10293            let len = __tmp.len();
10294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10295        } else {
10296            __tmp.len()
10297        }
10298    }
10299}
10300#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10301#[doc = ""]
10302#[doc = "ID: 130"]
10303#[derive(Debug, Clone, PartialEq)]
10304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10306#[cfg_attr(feature = "ts", derive(TS))]
10307#[cfg_attr(feature = "ts", ts(export))]
10308pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10309    #[doc = "total data size (set on ACK only)."]
10310    pub size: u32,
10311    #[doc = "Width of a matrix or image."]
10312    pub width: u16,
10313    #[doc = "Height of a matrix or image."]
10314    pub height: u16,
10315    #[doc = "Number of packets being sent (set on ACK only)."]
10316    pub packets: u16,
10317    #[doc = "Type of requested/acknowledged data."]
10318    pub mavtype: MavlinkDataStreamType,
10319    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10320    pub payload: u8,
10321    #[doc = "JPEG quality. Values: [1-100]."]
10322    pub jpg_quality: u8,
10323}
10324impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10325    pub const ENCODED_LEN: usize = 13usize;
10326    pub const DEFAULT: Self = Self {
10327        size: 0_u32,
10328        width: 0_u16,
10329        height: 0_u16,
10330        packets: 0_u16,
10331        mavtype: MavlinkDataStreamType::DEFAULT,
10332        payload: 0_u8,
10333        jpg_quality: 0_u8,
10334    };
10335    #[cfg(feature = "arbitrary")]
10336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10337        use arbitrary::{Arbitrary, Unstructured};
10338        let mut buf = [0u8; 1024];
10339        rng.fill_bytes(&mut buf);
10340        let mut unstructured = Unstructured::new(&buf);
10341        Self::arbitrary(&mut unstructured).unwrap_or_default()
10342    }
10343}
10344impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10345    fn default() -> Self {
10346        Self::DEFAULT.clone()
10347    }
10348}
10349impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10350    type Message = MavMessage;
10351    const ID: u32 = 130u32;
10352    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10353    const EXTRA_CRC: u8 = 29u8;
10354    const ENCODED_LEN: usize = 13usize;
10355    fn deser(
10356        _version: MavlinkVersion,
10357        __input: &[u8],
10358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10359        let avail_len = __input.len();
10360        let mut payload_buf = [0; Self::ENCODED_LEN];
10361        let mut buf = if avail_len < Self::ENCODED_LEN {
10362            payload_buf[0..avail_len].copy_from_slice(__input);
10363            Bytes::new(&payload_buf)
10364        } else {
10365            Bytes::new(__input)
10366        };
10367        let mut __struct = Self::default();
10368        __struct.size = buf.get_u32_le();
10369        __struct.width = buf.get_u16_le();
10370        __struct.height = buf.get_u16_le();
10371        __struct.packets = buf.get_u16_le();
10372        let tmp = buf.get_u8();
10373        __struct.mavtype =
10374            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10375                enum_type: "MavlinkDataStreamType",
10376                value: tmp as u32,
10377            })?;
10378        __struct.payload = buf.get_u8();
10379        __struct.jpg_quality = buf.get_u8();
10380        Ok(__struct)
10381    }
10382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10383        let mut __tmp = BytesMut::new(bytes);
10384        #[allow(clippy::absurd_extreme_comparisons)]
10385        #[allow(unused_comparisons)]
10386        if __tmp.remaining() < Self::ENCODED_LEN {
10387            panic!(
10388                "buffer is too small (need {} bytes, but got {})",
10389                Self::ENCODED_LEN,
10390                __tmp.remaining(),
10391            )
10392        }
10393        __tmp.put_u32_le(self.size);
10394        __tmp.put_u16_le(self.width);
10395        __tmp.put_u16_le(self.height);
10396        __tmp.put_u16_le(self.packets);
10397        __tmp.put_u8(self.mavtype as u8);
10398        __tmp.put_u8(self.payload);
10399        __tmp.put_u8(self.jpg_quality);
10400        if matches!(version, MavlinkVersion::V2) {
10401            let len = __tmp.len();
10402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10403        } else {
10404            __tmp.len()
10405        }
10406    }
10407}
10408#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10409#[doc = ""]
10410#[doc = "ID: 254"]
10411#[derive(Debug, Clone, PartialEq)]
10412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10414#[cfg_attr(feature = "ts", derive(TS))]
10415#[cfg_attr(feature = "ts", ts(export))]
10416pub struct DEBUG_DATA {
10417    #[doc = "Timestamp (time since system boot)."]
10418    pub time_boot_ms: u32,
10419    #[doc = "DEBUG value"]
10420    pub value: f32,
10421    #[doc = "index of debug variable"]
10422    pub ind: u8,
10423}
10424impl DEBUG_DATA {
10425    pub const ENCODED_LEN: usize = 9usize;
10426    pub const DEFAULT: Self = Self {
10427        time_boot_ms: 0_u32,
10428        value: 0.0_f32,
10429        ind: 0_u8,
10430    };
10431    #[cfg(feature = "arbitrary")]
10432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10433        use arbitrary::{Arbitrary, Unstructured};
10434        let mut buf = [0u8; 1024];
10435        rng.fill_bytes(&mut buf);
10436        let mut unstructured = Unstructured::new(&buf);
10437        Self::arbitrary(&mut unstructured).unwrap_or_default()
10438    }
10439}
10440impl Default for DEBUG_DATA {
10441    fn default() -> Self {
10442        Self::DEFAULT.clone()
10443    }
10444}
10445impl MessageData for DEBUG_DATA {
10446    type Message = MavMessage;
10447    const ID: u32 = 254u32;
10448    const NAME: &'static str = "DEBUG";
10449    const EXTRA_CRC: u8 = 46u8;
10450    const ENCODED_LEN: usize = 9usize;
10451    fn deser(
10452        _version: MavlinkVersion,
10453        __input: &[u8],
10454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10455        let avail_len = __input.len();
10456        let mut payload_buf = [0; Self::ENCODED_LEN];
10457        let mut buf = if avail_len < Self::ENCODED_LEN {
10458            payload_buf[0..avail_len].copy_from_slice(__input);
10459            Bytes::new(&payload_buf)
10460        } else {
10461            Bytes::new(__input)
10462        };
10463        let mut __struct = Self::default();
10464        __struct.time_boot_ms = buf.get_u32_le();
10465        __struct.value = buf.get_f32_le();
10466        __struct.ind = buf.get_u8();
10467        Ok(__struct)
10468    }
10469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10470        let mut __tmp = BytesMut::new(bytes);
10471        #[allow(clippy::absurd_extreme_comparisons)]
10472        #[allow(unused_comparisons)]
10473        if __tmp.remaining() < Self::ENCODED_LEN {
10474            panic!(
10475                "buffer is too small (need {} bytes, but got {})",
10476                Self::ENCODED_LEN,
10477                __tmp.remaining(),
10478            )
10479        }
10480        __tmp.put_u32_le(self.time_boot_ms);
10481        __tmp.put_f32_le(self.value);
10482        __tmp.put_u8(self.ind);
10483        if matches!(version, MavlinkVersion::V2) {
10484            let len = __tmp.len();
10485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10486        } else {
10487            __tmp.len()
10488        }
10489    }
10490}
10491#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10492#[doc = ""]
10493#[doc = "ID: 350"]
10494#[derive(Debug, Clone, PartialEq)]
10495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10497#[cfg_attr(feature = "ts", derive(TS))]
10498#[cfg_attr(feature = "ts", ts(export))]
10499pub struct DEBUG_FLOAT_ARRAY_DATA {
10500    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10501    pub time_usec: u64,
10502    #[doc = "Unique ID used to discriminate between arrays"]
10503    pub array_id: u16,
10504    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10505    #[cfg_attr(
10506        feature = "serde",
10507        serde(
10508            serialize_with = "crate::nulstr::serialize::<_, 10>",
10509            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
10510        )
10511    )]
10512    #[cfg_attr(feature = "ts", ts(type = "string"))]
10513    pub name: [u8; 10],
10514    #[doc = "data"]
10515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10516    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10517    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10518    pub data: [f32; 58],
10519}
10520impl DEBUG_FLOAT_ARRAY_DATA {
10521    pub const ENCODED_LEN: usize = 252usize;
10522    pub const DEFAULT: Self = Self {
10523        time_usec: 0_u64,
10524        array_id: 0_u16,
10525        name: [0_u8; 10usize],
10526        data: [0.0_f32; 58usize],
10527    };
10528    #[cfg(feature = "arbitrary")]
10529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10530        use arbitrary::{Arbitrary, Unstructured};
10531        let mut buf = [0u8; 1024];
10532        rng.fill_bytes(&mut buf);
10533        let mut unstructured = Unstructured::new(&buf);
10534        Self::arbitrary(&mut unstructured).unwrap_or_default()
10535    }
10536}
10537impl Default for DEBUG_FLOAT_ARRAY_DATA {
10538    fn default() -> Self {
10539        Self::DEFAULT.clone()
10540    }
10541}
10542impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10543    type Message = MavMessage;
10544    const ID: u32 = 350u32;
10545    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10546    const EXTRA_CRC: u8 = 232u8;
10547    const ENCODED_LEN: usize = 252usize;
10548    fn deser(
10549        _version: MavlinkVersion,
10550        __input: &[u8],
10551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10552        let avail_len = __input.len();
10553        let mut payload_buf = [0; Self::ENCODED_LEN];
10554        let mut buf = if avail_len < Self::ENCODED_LEN {
10555            payload_buf[0..avail_len].copy_from_slice(__input);
10556            Bytes::new(&payload_buf)
10557        } else {
10558            Bytes::new(__input)
10559        };
10560        let mut __struct = Self::default();
10561        __struct.time_usec = buf.get_u64_le();
10562        __struct.array_id = buf.get_u16_le();
10563        for v in &mut __struct.name {
10564            let val = buf.get_u8();
10565            *v = val;
10566        }
10567        for v in &mut __struct.data {
10568            let val = buf.get_f32_le();
10569            *v = val;
10570        }
10571        Ok(__struct)
10572    }
10573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10574        let mut __tmp = BytesMut::new(bytes);
10575        #[allow(clippy::absurd_extreme_comparisons)]
10576        #[allow(unused_comparisons)]
10577        if __tmp.remaining() < Self::ENCODED_LEN {
10578            panic!(
10579                "buffer is too small (need {} bytes, but got {})",
10580                Self::ENCODED_LEN,
10581                __tmp.remaining(),
10582            )
10583        }
10584        __tmp.put_u64_le(self.time_usec);
10585        __tmp.put_u16_le(self.array_id);
10586        for val in &self.name {
10587            __tmp.put_u8(*val);
10588        }
10589        if matches!(version, MavlinkVersion::V2) {
10590            for val in &self.data {
10591                __tmp.put_f32_le(*val);
10592            }
10593            let len = __tmp.len();
10594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10595        } else {
10596            __tmp.len()
10597        }
10598    }
10599}
10600#[doc = "To debug something using a named 3D vector."]
10601#[doc = ""]
10602#[doc = "ID: 250"]
10603#[derive(Debug, Clone, PartialEq)]
10604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10606#[cfg_attr(feature = "ts", derive(TS))]
10607#[cfg_attr(feature = "ts", ts(export))]
10608pub struct DEBUG_VECT_DATA {
10609    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10610    pub time_usec: u64,
10611    #[doc = "x"]
10612    pub x: f32,
10613    #[doc = "y"]
10614    pub y: f32,
10615    #[doc = "z"]
10616    pub z: f32,
10617    #[doc = "Name"]
10618    #[cfg_attr(
10619        feature = "serde",
10620        serde(
10621            serialize_with = "crate::nulstr::serialize::<_, 10>",
10622            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
10623        )
10624    )]
10625    #[cfg_attr(feature = "ts", ts(type = "string"))]
10626    pub name: [u8; 10],
10627}
10628impl DEBUG_VECT_DATA {
10629    pub const ENCODED_LEN: usize = 30usize;
10630    pub const DEFAULT: Self = Self {
10631        time_usec: 0_u64,
10632        x: 0.0_f32,
10633        y: 0.0_f32,
10634        z: 0.0_f32,
10635        name: [0_u8; 10usize],
10636    };
10637    #[cfg(feature = "arbitrary")]
10638    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10639        use arbitrary::{Arbitrary, Unstructured};
10640        let mut buf = [0u8; 1024];
10641        rng.fill_bytes(&mut buf);
10642        let mut unstructured = Unstructured::new(&buf);
10643        Self::arbitrary(&mut unstructured).unwrap_or_default()
10644    }
10645}
10646impl Default for DEBUG_VECT_DATA {
10647    fn default() -> Self {
10648        Self::DEFAULT.clone()
10649    }
10650}
10651impl MessageData for DEBUG_VECT_DATA {
10652    type Message = MavMessage;
10653    const ID: u32 = 250u32;
10654    const NAME: &'static str = "DEBUG_VECT";
10655    const EXTRA_CRC: u8 = 49u8;
10656    const ENCODED_LEN: usize = 30usize;
10657    fn deser(
10658        _version: MavlinkVersion,
10659        __input: &[u8],
10660    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10661        let avail_len = __input.len();
10662        let mut payload_buf = [0; Self::ENCODED_LEN];
10663        let mut buf = if avail_len < Self::ENCODED_LEN {
10664            payload_buf[0..avail_len].copy_from_slice(__input);
10665            Bytes::new(&payload_buf)
10666        } else {
10667            Bytes::new(__input)
10668        };
10669        let mut __struct = Self::default();
10670        __struct.time_usec = buf.get_u64_le();
10671        __struct.x = buf.get_f32_le();
10672        __struct.y = buf.get_f32_le();
10673        __struct.z = buf.get_f32_le();
10674        for v in &mut __struct.name {
10675            let val = buf.get_u8();
10676            *v = val;
10677        }
10678        Ok(__struct)
10679    }
10680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10681        let mut __tmp = BytesMut::new(bytes);
10682        #[allow(clippy::absurd_extreme_comparisons)]
10683        #[allow(unused_comparisons)]
10684        if __tmp.remaining() < Self::ENCODED_LEN {
10685            panic!(
10686                "buffer is too small (need {} bytes, but got {})",
10687                Self::ENCODED_LEN,
10688                __tmp.remaining(),
10689            )
10690        }
10691        __tmp.put_u64_le(self.time_usec);
10692        __tmp.put_f32_le(self.x);
10693        __tmp.put_f32_le(self.y);
10694        __tmp.put_f32_le(self.z);
10695        for val in &self.name {
10696            __tmp.put_u8(*val);
10697        }
10698        if matches!(version, MavlinkVersion::V2) {
10699            let len = __tmp.len();
10700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10701        } else {
10702            __tmp.len()
10703        }
10704    }
10705}
10706#[doc = "Distance sensor information for an onboard rangefinder."]
10707#[doc = ""]
10708#[doc = "ID: 132"]
10709#[derive(Debug, Clone, PartialEq)]
10710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10712#[cfg_attr(feature = "ts", derive(TS))]
10713#[cfg_attr(feature = "ts", ts(export))]
10714pub struct DISTANCE_SENSOR_DATA {
10715    #[doc = "Timestamp (time since system boot)."]
10716    pub time_boot_ms: u32,
10717    #[doc = "Minimum distance the sensor can measure"]
10718    pub min_distance: u16,
10719    #[doc = "Maximum distance the sensor can measure"]
10720    pub max_distance: u16,
10721    #[doc = "Current distance reading"]
10722    pub current_distance: u16,
10723    #[doc = "Type of distance sensor."]
10724    pub mavtype: MavDistanceSensor,
10725    #[doc = "Onboard ID of the sensor"]
10726    pub id: u8,
10727    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10728    pub orientation: MavSensorOrientation,
10729    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10730    pub covariance: u8,
10731    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10732    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10733    pub horizontal_fov: f32,
10734    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10735    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10736    pub vertical_fov: f32,
10737    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10738    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10740    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10741    pub quaternion: [f32; 4],
10742    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10743    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10744    pub signal_quality: u8,
10745}
10746impl DISTANCE_SENSOR_DATA {
10747    pub const ENCODED_LEN: usize = 39usize;
10748    pub const DEFAULT: Self = Self {
10749        time_boot_ms: 0_u32,
10750        min_distance: 0_u16,
10751        max_distance: 0_u16,
10752        current_distance: 0_u16,
10753        mavtype: MavDistanceSensor::DEFAULT,
10754        id: 0_u8,
10755        orientation: MavSensorOrientation::DEFAULT,
10756        covariance: 0_u8,
10757        horizontal_fov: 0.0_f32,
10758        vertical_fov: 0.0_f32,
10759        quaternion: [0.0_f32; 4usize],
10760        signal_quality: 0_u8,
10761    };
10762    #[cfg(feature = "arbitrary")]
10763    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10764        use arbitrary::{Arbitrary, Unstructured};
10765        let mut buf = [0u8; 1024];
10766        rng.fill_bytes(&mut buf);
10767        let mut unstructured = Unstructured::new(&buf);
10768        Self::arbitrary(&mut unstructured).unwrap_or_default()
10769    }
10770}
10771impl Default for DISTANCE_SENSOR_DATA {
10772    fn default() -> Self {
10773        Self::DEFAULT.clone()
10774    }
10775}
10776impl MessageData for DISTANCE_SENSOR_DATA {
10777    type Message = MavMessage;
10778    const ID: u32 = 132u32;
10779    const NAME: &'static str = "DISTANCE_SENSOR";
10780    const EXTRA_CRC: u8 = 85u8;
10781    const ENCODED_LEN: usize = 39usize;
10782    fn deser(
10783        _version: MavlinkVersion,
10784        __input: &[u8],
10785    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10786        let avail_len = __input.len();
10787        let mut payload_buf = [0; Self::ENCODED_LEN];
10788        let mut buf = if avail_len < Self::ENCODED_LEN {
10789            payload_buf[0..avail_len].copy_from_slice(__input);
10790            Bytes::new(&payload_buf)
10791        } else {
10792            Bytes::new(__input)
10793        };
10794        let mut __struct = Self::default();
10795        __struct.time_boot_ms = buf.get_u32_le();
10796        __struct.min_distance = buf.get_u16_le();
10797        __struct.max_distance = buf.get_u16_le();
10798        __struct.current_distance = buf.get_u16_le();
10799        let tmp = buf.get_u8();
10800        __struct.mavtype =
10801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10802                enum_type: "MavDistanceSensor",
10803                value: tmp as u32,
10804            })?;
10805        __struct.id = buf.get_u8();
10806        let tmp = buf.get_u8();
10807        __struct.orientation =
10808            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10809                enum_type: "MavSensorOrientation",
10810                value: tmp as u32,
10811            })?;
10812        __struct.covariance = buf.get_u8();
10813        __struct.horizontal_fov = buf.get_f32_le();
10814        __struct.vertical_fov = buf.get_f32_le();
10815        for v in &mut __struct.quaternion {
10816            let val = buf.get_f32_le();
10817            *v = val;
10818        }
10819        __struct.signal_quality = buf.get_u8();
10820        Ok(__struct)
10821    }
10822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10823        let mut __tmp = BytesMut::new(bytes);
10824        #[allow(clippy::absurd_extreme_comparisons)]
10825        #[allow(unused_comparisons)]
10826        if __tmp.remaining() < Self::ENCODED_LEN {
10827            panic!(
10828                "buffer is too small (need {} bytes, but got {})",
10829                Self::ENCODED_LEN,
10830                __tmp.remaining(),
10831            )
10832        }
10833        __tmp.put_u32_le(self.time_boot_ms);
10834        __tmp.put_u16_le(self.min_distance);
10835        __tmp.put_u16_le(self.max_distance);
10836        __tmp.put_u16_le(self.current_distance);
10837        __tmp.put_u8(self.mavtype as u8);
10838        __tmp.put_u8(self.id);
10839        __tmp.put_u8(self.orientation as u8);
10840        __tmp.put_u8(self.covariance);
10841        if matches!(version, MavlinkVersion::V2) {
10842            __tmp.put_f32_le(self.horizontal_fov);
10843            __tmp.put_f32_le(self.vertical_fov);
10844            for val in &self.quaternion {
10845                __tmp.put_f32_le(*val);
10846            }
10847            __tmp.put_u8(self.signal_quality);
10848            let len = __tmp.len();
10849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10850        } else {
10851            __tmp.len()
10852        }
10853    }
10854}
10855#[doc = "EFI status output."]
10856#[doc = ""]
10857#[doc = "ID: 225"]
10858#[derive(Debug, Clone, PartialEq)]
10859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10861#[cfg_attr(feature = "ts", derive(TS))]
10862#[cfg_attr(feature = "ts", ts(export))]
10863pub struct EFI_STATUS_DATA {
10864    #[doc = "ECU index"]
10865    pub ecu_index: f32,
10866    #[doc = "RPM"]
10867    pub rpm: f32,
10868    #[doc = "Fuel consumed"]
10869    pub fuel_consumed: f32,
10870    #[doc = "Fuel flow rate"]
10871    pub fuel_flow: f32,
10872    #[doc = "Engine load"]
10873    pub engine_load: f32,
10874    #[doc = "Throttle position"]
10875    pub throttle_position: f32,
10876    #[doc = "Spark dwell time"]
10877    pub spark_dwell_time: f32,
10878    #[doc = "Barometric pressure"]
10879    pub barometric_pressure: f32,
10880    #[doc = "Intake manifold pressure("]
10881    pub intake_manifold_pressure: f32,
10882    #[doc = "Intake manifold temperature"]
10883    pub intake_manifold_temperature: f32,
10884    #[doc = "Cylinder head temperature"]
10885    pub cylinder_head_temperature: f32,
10886    #[doc = "Ignition timing (Crank angle degrees)"]
10887    pub ignition_timing: f32,
10888    #[doc = "Injection time"]
10889    pub injection_time: f32,
10890    #[doc = "Exhaust gas temperature"]
10891    pub exhaust_gas_temperature: f32,
10892    #[doc = "Output throttle"]
10893    pub throttle_out: f32,
10894    #[doc = "Pressure/temperature compensation"]
10895    pub pt_compensation: f32,
10896    #[doc = "EFI health status"]
10897    pub health: u8,
10898    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10899    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10900    pub ignition_voltage: f32,
10901    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10902    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10903    pub fuel_pressure: f32,
10904}
10905impl EFI_STATUS_DATA {
10906    pub const ENCODED_LEN: usize = 73usize;
10907    pub const DEFAULT: Self = Self {
10908        ecu_index: 0.0_f32,
10909        rpm: 0.0_f32,
10910        fuel_consumed: 0.0_f32,
10911        fuel_flow: 0.0_f32,
10912        engine_load: 0.0_f32,
10913        throttle_position: 0.0_f32,
10914        spark_dwell_time: 0.0_f32,
10915        barometric_pressure: 0.0_f32,
10916        intake_manifold_pressure: 0.0_f32,
10917        intake_manifold_temperature: 0.0_f32,
10918        cylinder_head_temperature: 0.0_f32,
10919        ignition_timing: 0.0_f32,
10920        injection_time: 0.0_f32,
10921        exhaust_gas_temperature: 0.0_f32,
10922        throttle_out: 0.0_f32,
10923        pt_compensation: 0.0_f32,
10924        health: 0_u8,
10925        ignition_voltage: 0.0_f32,
10926        fuel_pressure: 0.0_f32,
10927    };
10928    #[cfg(feature = "arbitrary")]
10929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10930        use arbitrary::{Arbitrary, Unstructured};
10931        let mut buf = [0u8; 1024];
10932        rng.fill_bytes(&mut buf);
10933        let mut unstructured = Unstructured::new(&buf);
10934        Self::arbitrary(&mut unstructured).unwrap_or_default()
10935    }
10936}
10937impl Default for EFI_STATUS_DATA {
10938    fn default() -> Self {
10939        Self::DEFAULT.clone()
10940    }
10941}
10942impl MessageData for EFI_STATUS_DATA {
10943    type Message = MavMessage;
10944    const ID: u32 = 225u32;
10945    const NAME: &'static str = "EFI_STATUS";
10946    const EXTRA_CRC: u8 = 208u8;
10947    const ENCODED_LEN: usize = 73usize;
10948    fn deser(
10949        _version: MavlinkVersion,
10950        __input: &[u8],
10951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10952        let avail_len = __input.len();
10953        let mut payload_buf = [0; Self::ENCODED_LEN];
10954        let mut buf = if avail_len < Self::ENCODED_LEN {
10955            payload_buf[0..avail_len].copy_from_slice(__input);
10956            Bytes::new(&payload_buf)
10957        } else {
10958            Bytes::new(__input)
10959        };
10960        let mut __struct = Self::default();
10961        __struct.ecu_index = buf.get_f32_le();
10962        __struct.rpm = buf.get_f32_le();
10963        __struct.fuel_consumed = buf.get_f32_le();
10964        __struct.fuel_flow = buf.get_f32_le();
10965        __struct.engine_load = buf.get_f32_le();
10966        __struct.throttle_position = buf.get_f32_le();
10967        __struct.spark_dwell_time = buf.get_f32_le();
10968        __struct.barometric_pressure = buf.get_f32_le();
10969        __struct.intake_manifold_pressure = buf.get_f32_le();
10970        __struct.intake_manifold_temperature = buf.get_f32_le();
10971        __struct.cylinder_head_temperature = buf.get_f32_le();
10972        __struct.ignition_timing = buf.get_f32_le();
10973        __struct.injection_time = buf.get_f32_le();
10974        __struct.exhaust_gas_temperature = buf.get_f32_le();
10975        __struct.throttle_out = buf.get_f32_le();
10976        __struct.pt_compensation = buf.get_f32_le();
10977        __struct.health = buf.get_u8();
10978        __struct.ignition_voltage = buf.get_f32_le();
10979        __struct.fuel_pressure = buf.get_f32_le();
10980        Ok(__struct)
10981    }
10982    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10983        let mut __tmp = BytesMut::new(bytes);
10984        #[allow(clippy::absurd_extreme_comparisons)]
10985        #[allow(unused_comparisons)]
10986        if __tmp.remaining() < Self::ENCODED_LEN {
10987            panic!(
10988                "buffer is too small (need {} bytes, but got {})",
10989                Self::ENCODED_LEN,
10990                __tmp.remaining(),
10991            )
10992        }
10993        __tmp.put_f32_le(self.ecu_index);
10994        __tmp.put_f32_le(self.rpm);
10995        __tmp.put_f32_le(self.fuel_consumed);
10996        __tmp.put_f32_le(self.fuel_flow);
10997        __tmp.put_f32_le(self.engine_load);
10998        __tmp.put_f32_le(self.throttle_position);
10999        __tmp.put_f32_le(self.spark_dwell_time);
11000        __tmp.put_f32_le(self.barometric_pressure);
11001        __tmp.put_f32_le(self.intake_manifold_pressure);
11002        __tmp.put_f32_le(self.intake_manifold_temperature);
11003        __tmp.put_f32_le(self.cylinder_head_temperature);
11004        __tmp.put_f32_le(self.ignition_timing);
11005        __tmp.put_f32_le(self.injection_time);
11006        __tmp.put_f32_le(self.exhaust_gas_temperature);
11007        __tmp.put_f32_le(self.throttle_out);
11008        __tmp.put_f32_le(self.pt_compensation);
11009        __tmp.put_u8(self.health);
11010        if matches!(version, MavlinkVersion::V2) {
11011            __tmp.put_f32_le(self.ignition_voltage);
11012            __tmp.put_f32_le(self.fuel_pressure);
11013            let len = __tmp.len();
11014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11015        } else {
11016            __tmp.len()
11017        }
11018    }
11019}
11020#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11021#[doc = ""]
11022#[doc = "ID: 131"]
11023#[derive(Debug, Clone, PartialEq)]
11024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11026#[cfg_attr(feature = "ts", derive(TS))]
11027#[cfg_attr(feature = "ts", ts(export))]
11028pub struct ENCAPSULATED_DATA_DATA {
11029    #[doc = "sequence number (starting with 0 on every transmission)"]
11030    pub seqnr: u16,
11031    #[doc = "image data bytes"]
11032    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11033    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11034    pub data: [u8; 253],
11035}
11036impl ENCAPSULATED_DATA_DATA {
11037    pub const ENCODED_LEN: usize = 255usize;
11038    pub const DEFAULT: Self = Self {
11039        seqnr: 0_u16,
11040        data: [0_u8; 253usize],
11041    };
11042    #[cfg(feature = "arbitrary")]
11043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11044        use arbitrary::{Arbitrary, Unstructured};
11045        let mut buf = [0u8; 1024];
11046        rng.fill_bytes(&mut buf);
11047        let mut unstructured = Unstructured::new(&buf);
11048        Self::arbitrary(&mut unstructured).unwrap_or_default()
11049    }
11050}
11051impl Default for ENCAPSULATED_DATA_DATA {
11052    fn default() -> Self {
11053        Self::DEFAULT.clone()
11054    }
11055}
11056impl MessageData for ENCAPSULATED_DATA_DATA {
11057    type Message = MavMessage;
11058    const ID: u32 = 131u32;
11059    const NAME: &'static str = "ENCAPSULATED_DATA";
11060    const EXTRA_CRC: u8 = 223u8;
11061    const ENCODED_LEN: usize = 255usize;
11062    fn deser(
11063        _version: MavlinkVersion,
11064        __input: &[u8],
11065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11066        let avail_len = __input.len();
11067        let mut payload_buf = [0; Self::ENCODED_LEN];
11068        let mut buf = if avail_len < Self::ENCODED_LEN {
11069            payload_buf[0..avail_len].copy_from_slice(__input);
11070            Bytes::new(&payload_buf)
11071        } else {
11072            Bytes::new(__input)
11073        };
11074        let mut __struct = Self::default();
11075        __struct.seqnr = buf.get_u16_le();
11076        for v in &mut __struct.data {
11077            let val = buf.get_u8();
11078            *v = val;
11079        }
11080        Ok(__struct)
11081    }
11082    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11083        let mut __tmp = BytesMut::new(bytes);
11084        #[allow(clippy::absurd_extreme_comparisons)]
11085        #[allow(unused_comparisons)]
11086        if __tmp.remaining() < Self::ENCODED_LEN {
11087            panic!(
11088                "buffer is too small (need {} bytes, but got {})",
11089                Self::ENCODED_LEN,
11090                __tmp.remaining(),
11091            )
11092        }
11093        __tmp.put_u16_le(self.seqnr);
11094        for val in &self.data {
11095            __tmp.put_u8(*val);
11096        }
11097        if matches!(version, MavlinkVersion::V2) {
11098            let len = __tmp.len();
11099            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11100        } else {
11101            __tmp.len()
11102        }
11103    }
11104}
11105#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11106#[doc = ""]
11107#[doc = "ID: 290"]
11108#[derive(Debug, Clone, PartialEq)]
11109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11111#[cfg_attr(feature = "ts", derive(TS))]
11112#[cfg_attr(feature = "ts", ts(export))]
11113pub struct ESC_INFO_DATA {
11114    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11115    pub time_usec: u64,
11116    #[doc = "Number of reported errors by each ESC since boot."]
11117    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11118    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11119    pub error_count: [u32; 4],
11120    #[doc = "Counter of data packets received."]
11121    pub counter: u16,
11122    #[doc = "Bitmap of ESC failure flags."]
11123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11124    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11125    pub failure_flags: [u16; 4],
11126    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11129    pub temperature: [i16; 4],
11130    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11131    pub index: u8,
11132    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11133    pub count: u8,
11134    #[doc = "Connection type protocol for all ESC."]
11135    pub connection_type: EscConnectionType,
11136    #[doc = "Information regarding online/offline status of each ESC."]
11137    pub info: u8,
11138}
11139impl ESC_INFO_DATA {
11140    pub const ENCODED_LEN: usize = 46usize;
11141    pub const DEFAULT: Self = Self {
11142        time_usec: 0_u64,
11143        error_count: [0_u32; 4usize],
11144        counter: 0_u16,
11145        failure_flags: [0_u16; 4usize],
11146        temperature: [0_i16; 4usize],
11147        index: 0_u8,
11148        count: 0_u8,
11149        connection_type: EscConnectionType::DEFAULT,
11150        info: 0_u8,
11151    };
11152    #[cfg(feature = "arbitrary")]
11153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11154        use arbitrary::{Arbitrary, Unstructured};
11155        let mut buf = [0u8; 1024];
11156        rng.fill_bytes(&mut buf);
11157        let mut unstructured = Unstructured::new(&buf);
11158        Self::arbitrary(&mut unstructured).unwrap_or_default()
11159    }
11160}
11161impl Default for ESC_INFO_DATA {
11162    fn default() -> Self {
11163        Self::DEFAULT.clone()
11164    }
11165}
11166impl MessageData for ESC_INFO_DATA {
11167    type Message = MavMessage;
11168    const ID: u32 = 290u32;
11169    const NAME: &'static str = "ESC_INFO";
11170    const EXTRA_CRC: u8 = 251u8;
11171    const ENCODED_LEN: usize = 46usize;
11172    fn deser(
11173        _version: MavlinkVersion,
11174        __input: &[u8],
11175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11176        let avail_len = __input.len();
11177        let mut payload_buf = [0; Self::ENCODED_LEN];
11178        let mut buf = if avail_len < Self::ENCODED_LEN {
11179            payload_buf[0..avail_len].copy_from_slice(__input);
11180            Bytes::new(&payload_buf)
11181        } else {
11182            Bytes::new(__input)
11183        };
11184        let mut __struct = Self::default();
11185        __struct.time_usec = buf.get_u64_le();
11186        for v in &mut __struct.error_count {
11187            let val = buf.get_u32_le();
11188            *v = val;
11189        }
11190        __struct.counter = buf.get_u16_le();
11191        for v in &mut __struct.failure_flags {
11192            let val = buf.get_u16_le();
11193            *v = val;
11194        }
11195        for v in &mut __struct.temperature {
11196            let val = buf.get_i16_le();
11197            *v = val;
11198        }
11199        __struct.index = buf.get_u8();
11200        __struct.count = buf.get_u8();
11201        let tmp = buf.get_u8();
11202        __struct.connection_type =
11203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11204                enum_type: "EscConnectionType",
11205                value: tmp as u32,
11206            })?;
11207        __struct.info = buf.get_u8();
11208        Ok(__struct)
11209    }
11210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11211        let mut __tmp = BytesMut::new(bytes);
11212        #[allow(clippy::absurd_extreme_comparisons)]
11213        #[allow(unused_comparisons)]
11214        if __tmp.remaining() < Self::ENCODED_LEN {
11215            panic!(
11216                "buffer is too small (need {} bytes, but got {})",
11217                Self::ENCODED_LEN,
11218                __tmp.remaining(),
11219            )
11220        }
11221        __tmp.put_u64_le(self.time_usec);
11222        for val in &self.error_count {
11223            __tmp.put_u32_le(*val);
11224        }
11225        __tmp.put_u16_le(self.counter);
11226        for val in &self.failure_flags {
11227            __tmp.put_u16_le(*val);
11228        }
11229        for val in &self.temperature {
11230            __tmp.put_i16_le(*val);
11231        }
11232        __tmp.put_u8(self.index);
11233        __tmp.put_u8(self.count);
11234        __tmp.put_u8(self.connection_type as u8);
11235        __tmp.put_u8(self.info);
11236        if matches!(version, MavlinkVersion::V2) {
11237            let len = __tmp.len();
11238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11239        } else {
11240            __tmp.len()
11241        }
11242    }
11243}
11244#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11245#[doc = ""]
11246#[doc = "ID: 291"]
11247#[derive(Debug, Clone, PartialEq)]
11248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11250#[cfg_attr(feature = "ts", derive(TS))]
11251#[cfg_attr(feature = "ts", ts(export))]
11252pub struct ESC_STATUS_DATA {
11253    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11254    pub time_usec: u64,
11255    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11256    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11257    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11258    pub rpm: [i32; 4],
11259    #[doc = "Voltage measured from each ESC."]
11260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11261    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11262    pub voltage: [f32; 4],
11263    #[doc = "Current measured from each ESC."]
11264    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11265    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11266    pub current: [f32; 4],
11267    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11268    pub index: u8,
11269}
11270impl ESC_STATUS_DATA {
11271    pub const ENCODED_LEN: usize = 57usize;
11272    pub const DEFAULT: Self = Self {
11273        time_usec: 0_u64,
11274        rpm: [0_i32; 4usize],
11275        voltage: [0.0_f32; 4usize],
11276        current: [0.0_f32; 4usize],
11277        index: 0_u8,
11278    };
11279    #[cfg(feature = "arbitrary")]
11280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11281        use arbitrary::{Arbitrary, Unstructured};
11282        let mut buf = [0u8; 1024];
11283        rng.fill_bytes(&mut buf);
11284        let mut unstructured = Unstructured::new(&buf);
11285        Self::arbitrary(&mut unstructured).unwrap_or_default()
11286    }
11287}
11288impl Default for ESC_STATUS_DATA {
11289    fn default() -> Self {
11290        Self::DEFAULT.clone()
11291    }
11292}
11293impl MessageData for ESC_STATUS_DATA {
11294    type Message = MavMessage;
11295    const ID: u32 = 291u32;
11296    const NAME: &'static str = "ESC_STATUS";
11297    const EXTRA_CRC: u8 = 10u8;
11298    const ENCODED_LEN: usize = 57usize;
11299    fn deser(
11300        _version: MavlinkVersion,
11301        __input: &[u8],
11302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11303        let avail_len = __input.len();
11304        let mut payload_buf = [0; Self::ENCODED_LEN];
11305        let mut buf = if avail_len < Self::ENCODED_LEN {
11306            payload_buf[0..avail_len].copy_from_slice(__input);
11307            Bytes::new(&payload_buf)
11308        } else {
11309            Bytes::new(__input)
11310        };
11311        let mut __struct = Self::default();
11312        __struct.time_usec = buf.get_u64_le();
11313        for v in &mut __struct.rpm {
11314            let val = buf.get_i32_le();
11315            *v = val;
11316        }
11317        for v in &mut __struct.voltage {
11318            let val = buf.get_f32_le();
11319            *v = val;
11320        }
11321        for v in &mut __struct.current {
11322            let val = buf.get_f32_le();
11323            *v = val;
11324        }
11325        __struct.index = buf.get_u8();
11326        Ok(__struct)
11327    }
11328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11329        let mut __tmp = BytesMut::new(bytes);
11330        #[allow(clippy::absurd_extreme_comparisons)]
11331        #[allow(unused_comparisons)]
11332        if __tmp.remaining() < Self::ENCODED_LEN {
11333            panic!(
11334                "buffer is too small (need {} bytes, but got {})",
11335                Self::ENCODED_LEN,
11336                __tmp.remaining(),
11337            )
11338        }
11339        __tmp.put_u64_le(self.time_usec);
11340        for val in &self.rpm {
11341            __tmp.put_i32_le(*val);
11342        }
11343        for val in &self.voltage {
11344            __tmp.put_f32_le(*val);
11345        }
11346        for val in &self.current {
11347            __tmp.put_f32_le(*val);
11348        }
11349        __tmp.put_u8(self.index);
11350        if matches!(version, MavlinkVersion::V2) {
11351            let len = __tmp.len();
11352            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11353        } else {
11354            __tmp.len()
11355        }
11356    }
11357}
11358#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11359#[doc = ""]
11360#[doc = "ID: 230"]
11361#[derive(Debug, Clone, PartialEq)]
11362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11364#[cfg_attr(feature = "ts", derive(TS))]
11365#[cfg_attr(feature = "ts", ts(export))]
11366pub struct ESTIMATOR_STATUS_DATA {
11367    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11368    pub time_usec: u64,
11369    #[doc = "Velocity innovation test ratio"]
11370    pub vel_ratio: f32,
11371    #[doc = "Horizontal position innovation test ratio"]
11372    pub pos_horiz_ratio: f32,
11373    #[doc = "Vertical position innovation test ratio"]
11374    pub pos_vert_ratio: f32,
11375    #[doc = "Magnetometer innovation test ratio"]
11376    pub mag_ratio: f32,
11377    #[doc = "Height above terrain innovation test ratio"]
11378    pub hagl_ratio: f32,
11379    #[doc = "True airspeed innovation test ratio"]
11380    pub tas_ratio: f32,
11381    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11382    pub pos_horiz_accuracy: f32,
11383    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11384    pub pos_vert_accuracy: f32,
11385    #[doc = "Bitmap indicating which EKF outputs are valid."]
11386    pub flags: EstimatorStatusFlags,
11387}
11388impl ESTIMATOR_STATUS_DATA {
11389    pub const ENCODED_LEN: usize = 42usize;
11390    pub const DEFAULT: Self = Self {
11391        time_usec: 0_u64,
11392        vel_ratio: 0.0_f32,
11393        pos_horiz_ratio: 0.0_f32,
11394        pos_vert_ratio: 0.0_f32,
11395        mag_ratio: 0.0_f32,
11396        hagl_ratio: 0.0_f32,
11397        tas_ratio: 0.0_f32,
11398        pos_horiz_accuracy: 0.0_f32,
11399        pos_vert_accuracy: 0.0_f32,
11400        flags: EstimatorStatusFlags::DEFAULT,
11401    };
11402    #[cfg(feature = "arbitrary")]
11403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11404        use arbitrary::{Arbitrary, Unstructured};
11405        let mut buf = [0u8; 1024];
11406        rng.fill_bytes(&mut buf);
11407        let mut unstructured = Unstructured::new(&buf);
11408        Self::arbitrary(&mut unstructured).unwrap_or_default()
11409    }
11410}
11411impl Default for ESTIMATOR_STATUS_DATA {
11412    fn default() -> Self {
11413        Self::DEFAULT.clone()
11414    }
11415}
11416impl MessageData for ESTIMATOR_STATUS_DATA {
11417    type Message = MavMessage;
11418    const ID: u32 = 230u32;
11419    const NAME: &'static str = "ESTIMATOR_STATUS";
11420    const EXTRA_CRC: u8 = 163u8;
11421    const ENCODED_LEN: usize = 42usize;
11422    fn deser(
11423        _version: MavlinkVersion,
11424        __input: &[u8],
11425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11426        let avail_len = __input.len();
11427        let mut payload_buf = [0; Self::ENCODED_LEN];
11428        let mut buf = if avail_len < Self::ENCODED_LEN {
11429            payload_buf[0..avail_len].copy_from_slice(__input);
11430            Bytes::new(&payload_buf)
11431        } else {
11432            Bytes::new(__input)
11433        };
11434        let mut __struct = Self::default();
11435        __struct.time_usec = buf.get_u64_le();
11436        __struct.vel_ratio = buf.get_f32_le();
11437        __struct.pos_horiz_ratio = buf.get_f32_le();
11438        __struct.pos_vert_ratio = buf.get_f32_le();
11439        __struct.mag_ratio = buf.get_f32_le();
11440        __struct.hagl_ratio = buf.get_f32_le();
11441        __struct.tas_ratio = buf.get_f32_le();
11442        __struct.pos_horiz_accuracy = buf.get_f32_le();
11443        __struct.pos_vert_accuracy = buf.get_f32_le();
11444        let tmp = buf.get_u16_le();
11445        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11446            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11447                flag_type: "EstimatorStatusFlags",
11448                value: tmp as u32,
11449            })?;
11450        Ok(__struct)
11451    }
11452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11453        let mut __tmp = BytesMut::new(bytes);
11454        #[allow(clippy::absurd_extreme_comparisons)]
11455        #[allow(unused_comparisons)]
11456        if __tmp.remaining() < Self::ENCODED_LEN {
11457            panic!(
11458                "buffer is too small (need {} bytes, but got {})",
11459                Self::ENCODED_LEN,
11460                __tmp.remaining(),
11461            )
11462        }
11463        __tmp.put_u64_le(self.time_usec);
11464        __tmp.put_f32_le(self.vel_ratio);
11465        __tmp.put_f32_le(self.pos_horiz_ratio);
11466        __tmp.put_f32_le(self.pos_vert_ratio);
11467        __tmp.put_f32_le(self.mag_ratio);
11468        __tmp.put_f32_le(self.hagl_ratio);
11469        __tmp.put_f32_le(self.tas_ratio);
11470        __tmp.put_f32_le(self.pos_horiz_accuracy);
11471        __tmp.put_f32_le(self.pos_vert_accuracy);
11472        __tmp.put_u16_le(self.flags.bits());
11473        if matches!(version, MavlinkVersion::V2) {
11474            let len = __tmp.len();
11475            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11476        } else {
11477            __tmp.len()
11478        }
11479    }
11480}
11481#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11482#[doc = ""]
11483#[doc = "ID: 410"]
11484#[derive(Debug, Clone, PartialEq)]
11485#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11487#[cfg_attr(feature = "ts", derive(TS))]
11488#[cfg_attr(feature = "ts", ts(export))]
11489pub struct EVENT_DATA {
11490    #[doc = "Event ID (as defined in the component metadata)"]
11491    pub id: u32,
11492    #[doc = "Timestamp (time since system boot when the event happened)."]
11493    pub event_time_boot_ms: u32,
11494    #[doc = "Sequence number."]
11495    pub sequence: u16,
11496    #[doc = "Component ID"]
11497    pub destination_component: u8,
11498    #[doc = "System ID"]
11499    pub destination_system: u8,
11500    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11501    pub log_levels: u8,
11502    #[doc = "Arguments (depend on event ID)."]
11503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11504    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11505    pub arguments: [u8; 40],
11506}
11507impl EVENT_DATA {
11508    pub const ENCODED_LEN: usize = 53usize;
11509    pub const DEFAULT: Self = Self {
11510        id: 0_u32,
11511        event_time_boot_ms: 0_u32,
11512        sequence: 0_u16,
11513        destination_component: 0_u8,
11514        destination_system: 0_u8,
11515        log_levels: 0_u8,
11516        arguments: [0_u8; 40usize],
11517    };
11518    #[cfg(feature = "arbitrary")]
11519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11520        use arbitrary::{Arbitrary, Unstructured};
11521        let mut buf = [0u8; 1024];
11522        rng.fill_bytes(&mut buf);
11523        let mut unstructured = Unstructured::new(&buf);
11524        Self::arbitrary(&mut unstructured).unwrap_or_default()
11525    }
11526}
11527impl Default for EVENT_DATA {
11528    fn default() -> Self {
11529        Self::DEFAULT.clone()
11530    }
11531}
11532impl MessageData for EVENT_DATA {
11533    type Message = MavMessage;
11534    const ID: u32 = 410u32;
11535    const NAME: &'static str = "EVENT";
11536    const EXTRA_CRC: u8 = 160u8;
11537    const ENCODED_LEN: usize = 53usize;
11538    fn deser(
11539        _version: MavlinkVersion,
11540        __input: &[u8],
11541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11542        let avail_len = __input.len();
11543        let mut payload_buf = [0; Self::ENCODED_LEN];
11544        let mut buf = if avail_len < Self::ENCODED_LEN {
11545            payload_buf[0..avail_len].copy_from_slice(__input);
11546            Bytes::new(&payload_buf)
11547        } else {
11548            Bytes::new(__input)
11549        };
11550        let mut __struct = Self::default();
11551        __struct.id = buf.get_u32_le();
11552        __struct.event_time_boot_ms = buf.get_u32_le();
11553        __struct.sequence = buf.get_u16_le();
11554        __struct.destination_component = buf.get_u8();
11555        __struct.destination_system = buf.get_u8();
11556        __struct.log_levels = buf.get_u8();
11557        for v in &mut __struct.arguments {
11558            let val = buf.get_u8();
11559            *v = val;
11560        }
11561        Ok(__struct)
11562    }
11563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11564        let mut __tmp = BytesMut::new(bytes);
11565        #[allow(clippy::absurd_extreme_comparisons)]
11566        #[allow(unused_comparisons)]
11567        if __tmp.remaining() < Self::ENCODED_LEN {
11568            panic!(
11569                "buffer is too small (need {} bytes, but got {})",
11570                Self::ENCODED_LEN,
11571                __tmp.remaining(),
11572            )
11573        }
11574        __tmp.put_u32_le(self.id);
11575        __tmp.put_u32_le(self.event_time_boot_ms);
11576        __tmp.put_u16_le(self.sequence);
11577        __tmp.put_u8(self.destination_component);
11578        __tmp.put_u8(self.destination_system);
11579        __tmp.put_u8(self.log_levels);
11580        for val in &self.arguments {
11581            __tmp.put_u8(*val);
11582        }
11583        if matches!(version, MavlinkVersion::V2) {
11584            let len = __tmp.len();
11585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11586        } else {
11587            __tmp.len()
11588        }
11589    }
11590}
11591#[doc = "Provides state for additional features."]
11592#[doc = ""]
11593#[doc = "ID: 245"]
11594#[derive(Debug, Clone, PartialEq)]
11595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11597#[cfg_attr(feature = "ts", derive(TS))]
11598#[cfg_attr(feature = "ts", ts(export))]
11599pub struct EXTENDED_SYS_STATE_DATA {
11600    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11601    pub vtol_state: MavVtolState,
11602    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11603    pub landed_state: MavLandedState,
11604}
11605impl EXTENDED_SYS_STATE_DATA {
11606    pub const ENCODED_LEN: usize = 2usize;
11607    pub const DEFAULT: Self = Self {
11608        vtol_state: MavVtolState::DEFAULT,
11609        landed_state: MavLandedState::DEFAULT,
11610    };
11611    #[cfg(feature = "arbitrary")]
11612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11613        use arbitrary::{Arbitrary, Unstructured};
11614        let mut buf = [0u8; 1024];
11615        rng.fill_bytes(&mut buf);
11616        let mut unstructured = Unstructured::new(&buf);
11617        Self::arbitrary(&mut unstructured).unwrap_or_default()
11618    }
11619}
11620impl Default for EXTENDED_SYS_STATE_DATA {
11621    fn default() -> Self {
11622        Self::DEFAULT.clone()
11623    }
11624}
11625impl MessageData for EXTENDED_SYS_STATE_DATA {
11626    type Message = MavMessage;
11627    const ID: u32 = 245u32;
11628    const NAME: &'static str = "EXTENDED_SYS_STATE";
11629    const EXTRA_CRC: u8 = 130u8;
11630    const ENCODED_LEN: usize = 2usize;
11631    fn deser(
11632        _version: MavlinkVersion,
11633        __input: &[u8],
11634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11635        let avail_len = __input.len();
11636        let mut payload_buf = [0; Self::ENCODED_LEN];
11637        let mut buf = if avail_len < Self::ENCODED_LEN {
11638            payload_buf[0..avail_len].copy_from_slice(__input);
11639            Bytes::new(&payload_buf)
11640        } else {
11641            Bytes::new(__input)
11642        };
11643        let mut __struct = Self::default();
11644        let tmp = buf.get_u8();
11645        __struct.vtol_state =
11646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11647                enum_type: "MavVtolState",
11648                value: tmp as u32,
11649            })?;
11650        let tmp = buf.get_u8();
11651        __struct.landed_state =
11652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11653                enum_type: "MavLandedState",
11654                value: tmp as u32,
11655            })?;
11656        Ok(__struct)
11657    }
11658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11659        let mut __tmp = BytesMut::new(bytes);
11660        #[allow(clippy::absurd_extreme_comparisons)]
11661        #[allow(unused_comparisons)]
11662        if __tmp.remaining() < Self::ENCODED_LEN {
11663            panic!(
11664                "buffer is too small (need {} bytes, but got {})",
11665                Self::ENCODED_LEN,
11666                __tmp.remaining(),
11667            )
11668        }
11669        __tmp.put_u8(self.vtol_state as u8);
11670        __tmp.put_u8(self.landed_state as u8);
11671        if matches!(version, MavlinkVersion::V2) {
11672            let len = __tmp.len();
11673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11674        } else {
11675            __tmp.len()
11676        }
11677    }
11678}
11679#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11680#[doc = ""]
11681#[doc = "ID: 162"]
11682#[derive(Debug, Clone, PartialEq)]
11683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11685#[cfg_attr(feature = "ts", derive(TS))]
11686#[cfg_attr(feature = "ts", ts(export))]
11687pub struct FENCE_STATUS_DATA {
11688    #[doc = "Time (since boot) of last breach."]
11689    pub breach_time: u32,
11690    #[doc = "Number of fence breaches."]
11691    pub breach_count: u16,
11692    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11693    pub breach_status: u8,
11694    #[doc = "Last breach type."]
11695    pub breach_type: FenceBreach,
11696    #[doc = "Active action to prevent fence breach"]
11697    #[cfg_attr(feature = "serde", serde(default))]
11698    pub breach_mitigation: FenceMitigate,
11699}
11700impl FENCE_STATUS_DATA {
11701    pub const ENCODED_LEN: usize = 9usize;
11702    pub const DEFAULT: Self = Self {
11703        breach_time: 0_u32,
11704        breach_count: 0_u16,
11705        breach_status: 0_u8,
11706        breach_type: FenceBreach::DEFAULT,
11707        breach_mitigation: FenceMitigate::DEFAULT,
11708    };
11709    #[cfg(feature = "arbitrary")]
11710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11711        use arbitrary::{Arbitrary, Unstructured};
11712        let mut buf = [0u8; 1024];
11713        rng.fill_bytes(&mut buf);
11714        let mut unstructured = Unstructured::new(&buf);
11715        Self::arbitrary(&mut unstructured).unwrap_or_default()
11716    }
11717}
11718impl Default for FENCE_STATUS_DATA {
11719    fn default() -> Self {
11720        Self::DEFAULT.clone()
11721    }
11722}
11723impl MessageData for FENCE_STATUS_DATA {
11724    type Message = MavMessage;
11725    const ID: u32 = 162u32;
11726    const NAME: &'static str = "FENCE_STATUS";
11727    const EXTRA_CRC: u8 = 189u8;
11728    const ENCODED_LEN: usize = 9usize;
11729    fn deser(
11730        _version: MavlinkVersion,
11731        __input: &[u8],
11732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11733        let avail_len = __input.len();
11734        let mut payload_buf = [0; Self::ENCODED_LEN];
11735        let mut buf = if avail_len < Self::ENCODED_LEN {
11736            payload_buf[0..avail_len].copy_from_slice(__input);
11737            Bytes::new(&payload_buf)
11738        } else {
11739            Bytes::new(__input)
11740        };
11741        let mut __struct = Self::default();
11742        __struct.breach_time = buf.get_u32_le();
11743        __struct.breach_count = buf.get_u16_le();
11744        __struct.breach_status = buf.get_u8();
11745        let tmp = buf.get_u8();
11746        __struct.breach_type =
11747            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11748                enum_type: "FenceBreach",
11749                value: tmp as u32,
11750            })?;
11751        let tmp = buf.get_u8();
11752        __struct.breach_mitigation =
11753            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11754                enum_type: "FenceMitigate",
11755                value: tmp as u32,
11756            })?;
11757        Ok(__struct)
11758    }
11759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11760        let mut __tmp = BytesMut::new(bytes);
11761        #[allow(clippy::absurd_extreme_comparisons)]
11762        #[allow(unused_comparisons)]
11763        if __tmp.remaining() < Self::ENCODED_LEN {
11764            panic!(
11765                "buffer is too small (need {} bytes, but got {})",
11766                Self::ENCODED_LEN,
11767                __tmp.remaining(),
11768            )
11769        }
11770        __tmp.put_u32_le(self.breach_time);
11771        __tmp.put_u16_le(self.breach_count);
11772        __tmp.put_u8(self.breach_status);
11773        __tmp.put_u8(self.breach_type as u8);
11774        if matches!(version, MavlinkVersion::V2) {
11775            __tmp.put_u8(self.breach_mitigation as u8);
11776            let len = __tmp.len();
11777            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11778        } else {
11779            __tmp.len()
11780        }
11781    }
11782}
11783#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11784#[doc = ""]
11785#[doc = "ID: 110"]
11786#[derive(Debug, Clone, PartialEq)]
11787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11789#[cfg_attr(feature = "ts", derive(TS))]
11790#[cfg_attr(feature = "ts", ts(export))]
11791pub struct FILE_TRANSFER_PROTOCOL_DATA {
11792    #[doc = "Network ID (0 for broadcast)"]
11793    pub target_network: u8,
11794    #[doc = "System ID (0 for broadcast)"]
11795    pub target_system: u8,
11796    #[doc = "Component ID (0 for broadcast)"]
11797    pub target_component: u8,
11798    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11799    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11800    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11801    pub payload: [u8; 251],
11802}
11803impl FILE_TRANSFER_PROTOCOL_DATA {
11804    pub const ENCODED_LEN: usize = 254usize;
11805    pub const DEFAULT: Self = Self {
11806        target_network: 0_u8,
11807        target_system: 0_u8,
11808        target_component: 0_u8,
11809        payload: [0_u8; 251usize],
11810    };
11811    #[cfg(feature = "arbitrary")]
11812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11813        use arbitrary::{Arbitrary, Unstructured};
11814        let mut buf = [0u8; 1024];
11815        rng.fill_bytes(&mut buf);
11816        let mut unstructured = Unstructured::new(&buf);
11817        Self::arbitrary(&mut unstructured).unwrap_or_default()
11818    }
11819}
11820impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11821    fn default() -> Self {
11822        Self::DEFAULT.clone()
11823    }
11824}
11825impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11826    type Message = MavMessage;
11827    const ID: u32 = 110u32;
11828    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11829    const EXTRA_CRC: u8 = 84u8;
11830    const ENCODED_LEN: usize = 254usize;
11831    fn deser(
11832        _version: MavlinkVersion,
11833        __input: &[u8],
11834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11835        let avail_len = __input.len();
11836        let mut payload_buf = [0; Self::ENCODED_LEN];
11837        let mut buf = if avail_len < Self::ENCODED_LEN {
11838            payload_buf[0..avail_len].copy_from_slice(__input);
11839            Bytes::new(&payload_buf)
11840        } else {
11841            Bytes::new(__input)
11842        };
11843        let mut __struct = Self::default();
11844        __struct.target_network = buf.get_u8();
11845        __struct.target_system = buf.get_u8();
11846        __struct.target_component = buf.get_u8();
11847        for v in &mut __struct.payload {
11848            let val = buf.get_u8();
11849            *v = val;
11850        }
11851        Ok(__struct)
11852    }
11853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11854        let mut __tmp = BytesMut::new(bytes);
11855        #[allow(clippy::absurd_extreme_comparisons)]
11856        #[allow(unused_comparisons)]
11857        if __tmp.remaining() < Self::ENCODED_LEN {
11858            panic!(
11859                "buffer is too small (need {} bytes, but got {})",
11860                Self::ENCODED_LEN,
11861                __tmp.remaining(),
11862            )
11863        }
11864        __tmp.put_u8(self.target_network);
11865        __tmp.put_u8(self.target_system);
11866        __tmp.put_u8(self.target_component);
11867        for val in &self.payload {
11868            __tmp.put_u8(*val);
11869        }
11870        if matches!(version, MavlinkVersion::V2) {
11871            let len = __tmp.len();
11872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11873        } else {
11874            __tmp.len()
11875        }
11876    }
11877}
11878#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11879#[doc = ""]
11880#[doc = "ID: 264"]
11881#[derive(Debug, Clone, PartialEq)]
11882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11884#[cfg_attr(feature = "ts", derive(TS))]
11885#[cfg_attr(feature = "ts", ts(export))]
11886pub struct FLIGHT_INFORMATION_DATA {
11887    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11888    pub arming_time_utc: u64,
11889    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11890    pub takeoff_time_utc: u64,
11891    #[doc = "Flight number. Note, field is misnamed UUID."]
11892    pub flight_uuid: u64,
11893    #[doc = "Timestamp (time since system boot)."]
11894    pub time_boot_ms: u32,
11895    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11897    pub landing_time: u32,
11898}
11899impl FLIGHT_INFORMATION_DATA {
11900    pub const ENCODED_LEN: usize = 32usize;
11901    pub const DEFAULT: Self = Self {
11902        arming_time_utc: 0_u64,
11903        takeoff_time_utc: 0_u64,
11904        flight_uuid: 0_u64,
11905        time_boot_ms: 0_u32,
11906        landing_time: 0_u32,
11907    };
11908    #[cfg(feature = "arbitrary")]
11909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11910        use arbitrary::{Arbitrary, Unstructured};
11911        let mut buf = [0u8; 1024];
11912        rng.fill_bytes(&mut buf);
11913        let mut unstructured = Unstructured::new(&buf);
11914        Self::arbitrary(&mut unstructured).unwrap_or_default()
11915    }
11916}
11917impl Default for FLIGHT_INFORMATION_DATA {
11918    fn default() -> Self {
11919        Self::DEFAULT.clone()
11920    }
11921}
11922impl MessageData for FLIGHT_INFORMATION_DATA {
11923    type Message = MavMessage;
11924    const ID: u32 = 264u32;
11925    const NAME: &'static str = "FLIGHT_INFORMATION";
11926    const EXTRA_CRC: u8 = 49u8;
11927    const ENCODED_LEN: usize = 32usize;
11928    fn deser(
11929        _version: MavlinkVersion,
11930        __input: &[u8],
11931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11932        let avail_len = __input.len();
11933        let mut payload_buf = [0; Self::ENCODED_LEN];
11934        let mut buf = if avail_len < Self::ENCODED_LEN {
11935            payload_buf[0..avail_len].copy_from_slice(__input);
11936            Bytes::new(&payload_buf)
11937        } else {
11938            Bytes::new(__input)
11939        };
11940        let mut __struct = Self::default();
11941        __struct.arming_time_utc = buf.get_u64_le();
11942        __struct.takeoff_time_utc = buf.get_u64_le();
11943        __struct.flight_uuid = buf.get_u64_le();
11944        __struct.time_boot_ms = buf.get_u32_le();
11945        __struct.landing_time = buf.get_u32_le();
11946        Ok(__struct)
11947    }
11948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11949        let mut __tmp = BytesMut::new(bytes);
11950        #[allow(clippy::absurd_extreme_comparisons)]
11951        #[allow(unused_comparisons)]
11952        if __tmp.remaining() < Self::ENCODED_LEN {
11953            panic!(
11954                "buffer is too small (need {} bytes, but got {})",
11955                Self::ENCODED_LEN,
11956                __tmp.remaining(),
11957            )
11958        }
11959        __tmp.put_u64_le(self.arming_time_utc);
11960        __tmp.put_u64_le(self.takeoff_time_utc);
11961        __tmp.put_u64_le(self.flight_uuid);
11962        __tmp.put_u32_le(self.time_boot_ms);
11963        if matches!(version, MavlinkVersion::V2) {
11964            __tmp.put_u32_le(self.landing_time);
11965            let len = __tmp.len();
11966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11967        } else {
11968            __tmp.len()
11969        }
11970    }
11971}
11972#[doc = "Current motion information from a designated system."]
11973#[doc = ""]
11974#[doc = "ID: 144"]
11975#[derive(Debug, Clone, PartialEq)]
11976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11978#[cfg_attr(feature = "ts", derive(TS))]
11979#[cfg_attr(feature = "ts", ts(export))]
11980pub struct FOLLOW_TARGET_DATA {
11981    #[doc = "Timestamp (time since system boot)."]
11982    pub timestamp: u64,
11983    #[doc = "button states or switches of a tracker device"]
11984    pub custom_state: u64,
11985    #[doc = "Latitude (WGS84)"]
11986    pub lat: i32,
11987    #[doc = "Longitude (WGS84)"]
11988    pub lon: i32,
11989    #[doc = "Altitude (MSL)"]
11990    pub alt: f32,
11991    #[doc = "target velocity (0,0,0) for unknown"]
11992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11994    pub vel: [f32; 3],
11995    #[doc = "linear target acceleration (0,0,0) for unknown"]
11996    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11997    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11998    pub acc: [f32; 3],
11999    #[doc = "(0 0 0 0 for unknown)"]
12000    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12001    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12002    pub attitude_q: [f32; 4],
12003    #[doc = "(0 0 0 for unknown)"]
12004    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12005    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12006    pub rates: [f32; 3],
12007    #[doc = "eph epv"]
12008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12010    pub position_cov: [f32; 3],
12011    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12012    pub est_capabilities: u8,
12013}
12014impl FOLLOW_TARGET_DATA {
12015    pub const ENCODED_LEN: usize = 93usize;
12016    pub const DEFAULT: Self = Self {
12017        timestamp: 0_u64,
12018        custom_state: 0_u64,
12019        lat: 0_i32,
12020        lon: 0_i32,
12021        alt: 0.0_f32,
12022        vel: [0.0_f32; 3usize],
12023        acc: [0.0_f32; 3usize],
12024        attitude_q: [0.0_f32; 4usize],
12025        rates: [0.0_f32; 3usize],
12026        position_cov: [0.0_f32; 3usize],
12027        est_capabilities: 0_u8,
12028    };
12029    #[cfg(feature = "arbitrary")]
12030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12031        use arbitrary::{Arbitrary, Unstructured};
12032        let mut buf = [0u8; 1024];
12033        rng.fill_bytes(&mut buf);
12034        let mut unstructured = Unstructured::new(&buf);
12035        Self::arbitrary(&mut unstructured).unwrap_or_default()
12036    }
12037}
12038impl Default for FOLLOW_TARGET_DATA {
12039    fn default() -> Self {
12040        Self::DEFAULT.clone()
12041    }
12042}
12043impl MessageData for FOLLOW_TARGET_DATA {
12044    type Message = MavMessage;
12045    const ID: u32 = 144u32;
12046    const NAME: &'static str = "FOLLOW_TARGET";
12047    const EXTRA_CRC: u8 = 127u8;
12048    const ENCODED_LEN: usize = 93usize;
12049    fn deser(
12050        _version: MavlinkVersion,
12051        __input: &[u8],
12052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12053        let avail_len = __input.len();
12054        let mut payload_buf = [0; Self::ENCODED_LEN];
12055        let mut buf = if avail_len < Self::ENCODED_LEN {
12056            payload_buf[0..avail_len].copy_from_slice(__input);
12057            Bytes::new(&payload_buf)
12058        } else {
12059            Bytes::new(__input)
12060        };
12061        let mut __struct = Self::default();
12062        __struct.timestamp = buf.get_u64_le();
12063        __struct.custom_state = buf.get_u64_le();
12064        __struct.lat = buf.get_i32_le();
12065        __struct.lon = buf.get_i32_le();
12066        __struct.alt = buf.get_f32_le();
12067        for v in &mut __struct.vel {
12068            let val = buf.get_f32_le();
12069            *v = val;
12070        }
12071        for v in &mut __struct.acc {
12072            let val = buf.get_f32_le();
12073            *v = val;
12074        }
12075        for v in &mut __struct.attitude_q {
12076            let val = buf.get_f32_le();
12077            *v = val;
12078        }
12079        for v in &mut __struct.rates {
12080            let val = buf.get_f32_le();
12081            *v = val;
12082        }
12083        for v in &mut __struct.position_cov {
12084            let val = buf.get_f32_le();
12085            *v = val;
12086        }
12087        __struct.est_capabilities = buf.get_u8();
12088        Ok(__struct)
12089    }
12090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12091        let mut __tmp = BytesMut::new(bytes);
12092        #[allow(clippy::absurd_extreme_comparisons)]
12093        #[allow(unused_comparisons)]
12094        if __tmp.remaining() < Self::ENCODED_LEN {
12095            panic!(
12096                "buffer is too small (need {} bytes, but got {})",
12097                Self::ENCODED_LEN,
12098                __tmp.remaining(),
12099            )
12100        }
12101        __tmp.put_u64_le(self.timestamp);
12102        __tmp.put_u64_le(self.custom_state);
12103        __tmp.put_i32_le(self.lat);
12104        __tmp.put_i32_le(self.lon);
12105        __tmp.put_f32_le(self.alt);
12106        for val in &self.vel {
12107            __tmp.put_f32_le(*val);
12108        }
12109        for val in &self.acc {
12110            __tmp.put_f32_le(*val);
12111        }
12112        for val in &self.attitude_q {
12113            __tmp.put_f32_le(*val);
12114        }
12115        for val in &self.rates {
12116            __tmp.put_f32_le(*val);
12117        }
12118        for val in &self.position_cov {
12119            __tmp.put_f32_le(*val);
12120        }
12121        __tmp.put_u8(self.est_capabilities);
12122        if matches!(version, MavlinkVersion::V2) {
12123            let len = __tmp.len();
12124            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12125        } else {
12126            __tmp.len()
12127        }
12128    }
12129}
12130#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12131#[doc = ""]
12132#[doc = "ID: 371"]
12133#[derive(Debug, Clone, PartialEq)]
12134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12136#[cfg_attr(feature = "ts", derive(TS))]
12137#[cfg_attr(feature = "ts", ts(export))]
12138pub struct FUEL_STATUS_DATA {
12139    #[doc = "Capacity when full. Must be provided."]
12140    pub maximum_fuel: f32,
12141    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12142    pub consumed_fuel: f32,
12143    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12144    pub remaining_fuel: f32,
12145    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12146    pub flow_rate: f32,
12147    #[doc = "Fuel temperature. NaN: field not provided."]
12148    pub temperature: f32,
12149    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12150    pub fuel_type: MavFuelType,
12151    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12152    pub id: u8,
12153    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12154    pub percent_remaining: u8,
12155}
12156impl FUEL_STATUS_DATA {
12157    pub const ENCODED_LEN: usize = 26usize;
12158    pub const DEFAULT: Self = Self {
12159        maximum_fuel: 0.0_f32,
12160        consumed_fuel: 0.0_f32,
12161        remaining_fuel: 0.0_f32,
12162        flow_rate: 0.0_f32,
12163        temperature: 0.0_f32,
12164        fuel_type: MavFuelType::DEFAULT,
12165        id: 0_u8,
12166        percent_remaining: 0_u8,
12167    };
12168    #[cfg(feature = "arbitrary")]
12169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12170        use arbitrary::{Arbitrary, Unstructured};
12171        let mut buf = [0u8; 1024];
12172        rng.fill_bytes(&mut buf);
12173        let mut unstructured = Unstructured::new(&buf);
12174        Self::arbitrary(&mut unstructured).unwrap_or_default()
12175    }
12176}
12177impl Default for FUEL_STATUS_DATA {
12178    fn default() -> Self {
12179        Self::DEFAULT.clone()
12180    }
12181}
12182impl MessageData for FUEL_STATUS_DATA {
12183    type Message = MavMessage;
12184    const ID: u32 = 371u32;
12185    const NAME: &'static str = "FUEL_STATUS";
12186    const EXTRA_CRC: u8 = 10u8;
12187    const ENCODED_LEN: usize = 26usize;
12188    fn deser(
12189        _version: MavlinkVersion,
12190        __input: &[u8],
12191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12192        let avail_len = __input.len();
12193        let mut payload_buf = [0; Self::ENCODED_LEN];
12194        let mut buf = if avail_len < Self::ENCODED_LEN {
12195            payload_buf[0..avail_len].copy_from_slice(__input);
12196            Bytes::new(&payload_buf)
12197        } else {
12198            Bytes::new(__input)
12199        };
12200        let mut __struct = Self::default();
12201        __struct.maximum_fuel = buf.get_f32_le();
12202        __struct.consumed_fuel = buf.get_f32_le();
12203        __struct.remaining_fuel = buf.get_f32_le();
12204        __struct.flow_rate = buf.get_f32_le();
12205        __struct.temperature = buf.get_f32_le();
12206        let tmp = buf.get_u32_le();
12207        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12208            ::mavlink_core::error::ParserError::InvalidEnum {
12209                enum_type: "MavFuelType",
12210                value: tmp as u32,
12211            },
12212        )?;
12213        __struct.id = buf.get_u8();
12214        __struct.percent_remaining = buf.get_u8();
12215        Ok(__struct)
12216    }
12217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12218        let mut __tmp = BytesMut::new(bytes);
12219        #[allow(clippy::absurd_extreme_comparisons)]
12220        #[allow(unused_comparisons)]
12221        if __tmp.remaining() < Self::ENCODED_LEN {
12222            panic!(
12223                "buffer is too small (need {} bytes, but got {})",
12224                Self::ENCODED_LEN,
12225                __tmp.remaining(),
12226            )
12227        }
12228        __tmp.put_f32_le(self.maximum_fuel);
12229        __tmp.put_f32_le(self.consumed_fuel);
12230        __tmp.put_f32_le(self.remaining_fuel);
12231        __tmp.put_f32_le(self.flow_rate);
12232        __tmp.put_f32_le(self.temperature);
12233        __tmp.put_u32_le(self.fuel_type as u32);
12234        __tmp.put_u8(self.id);
12235        __tmp.put_u8(self.percent_remaining);
12236        if matches!(version, MavlinkVersion::V2) {
12237            let len = __tmp.len();
12238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12239        } else {
12240            __tmp.len()
12241        }
12242    }
12243}
12244#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12245#[doc = ""]
12246#[doc = "ID: 373"]
12247#[derive(Debug, Clone, PartialEq)]
12248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12250#[cfg_attr(feature = "ts", derive(TS))]
12251#[cfg_attr(feature = "ts", ts(export))]
12252pub struct GENERATOR_STATUS_DATA {
12253    #[doc = "Status flags."]
12254    pub status: MavGeneratorStatusFlag,
12255    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12256    pub battery_current: f32,
12257    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12258    pub load_current: f32,
12259    #[doc = "The power being generated. NaN: field not provided"]
12260    pub power_generated: f32,
12261    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12262    pub bus_voltage: f32,
12263    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12264    pub bat_current_setpoint: f32,
12265    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12266    pub runtime: u32,
12267    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12268    pub time_until_maintenance: i32,
12269    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12270    pub generator_speed: u16,
12271    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12272    pub rectifier_temperature: i16,
12273    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12274    pub generator_temperature: i16,
12275}
12276impl GENERATOR_STATUS_DATA {
12277    pub const ENCODED_LEN: usize = 42usize;
12278    pub const DEFAULT: Self = Self {
12279        status: MavGeneratorStatusFlag::DEFAULT,
12280        battery_current: 0.0_f32,
12281        load_current: 0.0_f32,
12282        power_generated: 0.0_f32,
12283        bus_voltage: 0.0_f32,
12284        bat_current_setpoint: 0.0_f32,
12285        runtime: 0_u32,
12286        time_until_maintenance: 0_i32,
12287        generator_speed: 0_u16,
12288        rectifier_temperature: 0_i16,
12289        generator_temperature: 0_i16,
12290    };
12291    #[cfg(feature = "arbitrary")]
12292    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12293        use arbitrary::{Arbitrary, Unstructured};
12294        let mut buf = [0u8; 1024];
12295        rng.fill_bytes(&mut buf);
12296        let mut unstructured = Unstructured::new(&buf);
12297        Self::arbitrary(&mut unstructured).unwrap_or_default()
12298    }
12299}
12300impl Default for GENERATOR_STATUS_DATA {
12301    fn default() -> Self {
12302        Self::DEFAULT.clone()
12303    }
12304}
12305impl MessageData for GENERATOR_STATUS_DATA {
12306    type Message = MavMessage;
12307    const ID: u32 = 373u32;
12308    const NAME: &'static str = "GENERATOR_STATUS";
12309    const EXTRA_CRC: u8 = 117u8;
12310    const ENCODED_LEN: usize = 42usize;
12311    fn deser(
12312        _version: MavlinkVersion,
12313        __input: &[u8],
12314    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12315        let avail_len = __input.len();
12316        let mut payload_buf = [0; Self::ENCODED_LEN];
12317        let mut buf = if avail_len < Self::ENCODED_LEN {
12318            payload_buf[0..avail_len].copy_from_slice(__input);
12319            Bytes::new(&payload_buf)
12320        } else {
12321            Bytes::new(__input)
12322        };
12323        let mut __struct = Self::default();
12324        let tmp = buf.get_u64_le();
12325        __struct.status = MavGeneratorStatusFlag::from_bits(
12326            tmp & MavGeneratorStatusFlag::all().bits(),
12327        )
12328        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12329            flag_type: "MavGeneratorStatusFlag",
12330            value: tmp as u32,
12331        })?;
12332        __struct.battery_current = buf.get_f32_le();
12333        __struct.load_current = buf.get_f32_le();
12334        __struct.power_generated = buf.get_f32_le();
12335        __struct.bus_voltage = buf.get_f32_le();
12336        __struct.bat_current_setpoint = buf.get_f32_le();
12337        __struct.runtime = buf.get_u32_le();
12338        __struct.time_until_maintenance = buf.get_i32_le();
12339        __struct.generator_speed = buf.get_u16_le();
12340        __struct.rectifier_temperature = buf.get_i16_le();
12341        __struct.generator_temperature = buf.get_i16_le();
12342        Ok(__struct)
12343    }
12344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12345        let mut __tmp = BytesMut::new(bytes);
12346        #[allow(clippy::absurd_extreme_comparisons)]
12347        #[allow(unused_comparisons)]
12348        if __tmp.remaining() < Self::ENCODED_LEN {
12349            panic!(
12350                "buffer is too small (need {} bytes, but got {})",
12351                Self::ENCODED_LEN,
12352                __tmp.remaining(),
12353            )
12354        }
12355        __tmp.put_u64_le(self.status.bits());
12356        __tmp.put_f32_le(self.battery_current);
12357        __tmp.put_f32_le(self.load_current);
12358        __tmp.put_f32_le(self.power_generated);
12359        __tmp.put_f32_le(self.bus_voltage);
12360        __tmp.put_f32_le(self.bat_current_setpoint);
12361        __tmp.put_u32_le(self.runtime);
12362        __tmp.put_i32_le(self.time_until_maintenance);
12363        __tmp.put_u16_le(self.generator_speed);
12364        __tmp.put_i16_le(self.rectifier_temperature);
12365        __tmp.put_i16_le(self.generator_temperature);
12366        if matches!(version, MavlinkVersion::V2) {
12367            let len = __tmp.len();
12368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12369        } else {
12370            __tmp.len()
12371        }
12372    }
12373}
12374#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12375#[doc = ""]
12376#[doc = "ID: 285"]
12377#[derive(Debug, Clone, PartialEq)]
12378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12380#[cfg_attr(feature = "ts", derive(TS))]
12381#[cfg_attr(feature = "ts", ts(export))]
12382pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12383    #[doc = "Timestamp (time since system boot)."]
12384    pub time_boot_ms: u32,
12385    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12387    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12388    pub q: [f32; 4],
12389    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12390    pub angular_velocity_x: f32,
12391    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12392    pub angular_velocity_y: f32,
12393    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12394    pub angular_velocity_z: f32,
12395    #[doc = "Failure flags (0 for no failure)"]
12396    pub failure_flags: GimbalDeviceErrorFlags,
12397    #[doc = "Current gimbal flags set."]
12398    pub flags: GimbalDeviceFlags,
12399    #[doc = "System ID"]
12400    pub target_system: u8,
12401    #[doc = "Component ID"]
12402    pub target_component: u8,
12403    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12404    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12405    pub delta_yaw: f32,
12406    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12407    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12408    pub delta_yaw_velocity: f32,
12409    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12410    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12411    pub gimbal_device_id: u8,
12412}
12413impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12414    pub const ENCODED_LEN: usize = 49usize;
12415    pub const DEFAULT: Self = Self {
12416        time_boot_ms: 0_u32,
12417        q: [0.0_f32; 4usize],
12418        angular_velocity_x: 0.0_f32,
12419        angular_velocity_y: 0.0_f32,
12420        angular_velocity_z: 0.0_f32,
12421        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12422        flags: GimbalDeviceFlags::DEFAULT,
12423        target_system: 0_u8,
12424        target_component: 0_u8,
12425        delta_yaw: 0.0_f32,
12426        delta_yaw_velocity: 0.0_f32,
12427        gimbal_device_id: 0_u8,
12428    };
12429    #[cfg(feature = "arbitrary")]
12430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12431        use arbitrary::{Arbitrary, Unstructured};
12432        let mut buf = [0u8; 1024];
12433        rng.fill_bytes(&mut buf);
12434        let mut unstructured = Unstructured::new(&buf);
12435        Self::arbitrary(&mut unstructured).unwrap_or_default()
12436    }
12437}
12438impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12439    fn default() -> Self {
12440        Self::DEFAULT.clone()
12441    }
12442}
12443impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12444    type Message = MavMessage;
12445    const ID: u32 = 285u32;
12446    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12447    const EXTRA_CRC: u8 = 137u8;
12448    const ENCODED_LEN: usize = 49usize;
12449    fn deser(
12450        _version: MavlinkVersion,
12451        __input: &[u8],
12452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12453        let avail_len = __input.len();
12454        let mut payload_buf = [0; Self::ENCODED_LEN];
12455        let mut buf = if avail_len < Self::ENCODED_LEN {
12456            payload_buf[0..avail_len].copy_from_slice(__input);
12457            Bytes::new(&payload_buf)
12458        } else {
12459            Bytes::new(__input)
12460        };
12461        let mut __struct = Self::default();
12462        __struct.time_boot_ms = buf.get_u32_le();
12463        for v in &mut __struct.q {
12464            let val = buf.get_f32_le();
12465            *v = val;
12466        }
12467        __struct.angular_velocity_x = buf.get_f32_le();
12468        __struct.angular_velocity_y = buf.get_f32_le();
12469        __struct.angular_velocity_z = buf.get_f32_le();
12470        let tmp = buf.get_u32_le();
12471        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12472            tmp & GimbalDeviceErrorFlags::all().bits(),
12473        )
12474        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12475            flag_type: "GimbalDeviceErrorFlags",
12476            value: tmp as u32,
12477        })?;
12478        let tmp = buf.get_u16_le();
12479        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12480            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12481                flag_type: "GimbalDeviceFlags",
12482                value: tmp as u32,
12483            })?;
12484        __struct.target_system = buf.get_u8();
12485        __struct.target_component = buf.get_u8();
12486        __struct.delta_yaw = buf.get_f32_le();
12487        __struct.delta_yaw_velocity = buf.get_f32_le();
12488        __struct.gimbal_device_id = buf.get_u8();
12489        Ok(__struct)
12490    }
12491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12492        let mut __tmp = BytesMut::new(bytes);
12493        #[allow(clippy::absurd_extreme_comparisons)]
12494        #[allow(unused_comparisons)]
12495        if __tmp.remaining() < Self::ENCODED_LEN {
12496            panic!(
12497                "buffer is too small (need {} bytes, but got {})",
12498                Self::ENCODED_LEN,
12499                __tmp.remaining(),
12500            )
12501        }
12502        __tmp.put_u32_le(self.time_boot_ms);
12503        for val in &self.q {
12504            __tmp.put_f32_le(*val);
12505        }
12506        __tmp.put_f32_le(self.angular_velocity_x);
12507        __tmp.put_f32_le(self.angular_velocity_y);
12508        __tmp.put_f32_le(self.angular_velocity_z);
12509        __tmp.put_u32_le(self.failure_flags.bits());
12510        __tmp.put_u16_le(self.flags.bits());
12511        __tmp.put_u8(self.target_system);
12512        __tmp.put_u8(self.target_component);
12513        if matches!(version, MavlinkVersion::V2) {
12514            __tmp.put_f32_le(self.delta_yaw);
12515            __tmp.put_f32_le(self.delta_yaw_velocity);
12516            __tmp.put_u8(self.gimbal_device_id);
12517            let len = __tmp.len();
12518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12519        } else {
12520            __tmp.len()
12521        }
12522    }
12523}
12524#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12525#[doc = ""]
12526#[doc = "ID: 283"]
12527#[derive(Debug, Clone, PartialEq)]
12528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12530#[cfg_attr(feature = "ts", derive(TS))]
12531#[cfg_attr(feature = "ts", ts(export))]
12532pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12533    #[doc = "UID of gimbal hardware (0 if unknown)."]
12534    pub uid: u64,
12535    #[doc = "Timestamp (time since system boot)."]
12536    pub time_boot_ms: u32,
12537    #[doc = "0xff)."]
12538    pub firmware_version: u32,
12539    #[doc = "0xff)."]
12540    pub hardware_version: u32,
12541    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12542    pub roll_min: f32,
12543    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12544    pub roll_max: f32,
12545    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12546    pub pitch_min: f32,
12547    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12548    pub pitch_max: f32,
12549    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12550    pub yaw_min: f32,
12551    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12552    pub yaw_max: f32,
12553    #[doc = "Bitmap of gimbal capability flags."]
12554    pub cap_flags: GimbalDeviceCapFlags,
12555    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12556    pub custom_cap_flags: u16,
12557    #[doc = "Name of the gimbal vendor."]
12558    #[cfg_attr(
12559        feature = "serde",
12560        serde(
12561            serialize_with = "crate::nulstr::serialize::<_, 32>",
12562            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
12563        )
12564    )]
12565    #[cfg_attr(feature = "ts", ts(type = "string"))]
12566    pub vendor_name: [u8; 32],
12567    #[doc = "Name of the gimbal model."]
12568    #[cfg_attr(
12569        feature = "serde",
12570        serde(
12571            serialize_with = "crate::nulstr::serialize::<_, 32>",
12572            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
12573        )
12574    )]
12575    #[cfg_attr(feature = "ts", ts(type = "string"))]
12576    pub model_name: [u8; 32],
12577    #[doc = "Custom name of the gimbal given to it by the user."]
12578    #[cfg_attr(
12579        feature = "serde",
12580        serde(
12581            serialize_with = "crate::nulstr::serialize::<_, 32>",
12582            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
12583        )
12584    )]
12585    #[cfg_attr(feature = "ts", ts(type = "string"))]
12586    pub custom_name: [u8; 32],
12587    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12588    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12589    pub gimbal_device_id: u8,
12590}
12591impl GIMBAL_DEVICE_INFORMATION_DATA {
12592    pub const ENCODED_LEN: usize = 145usize;
12593    pub const DEFAULT: Self = Self {
12594        uid: 0_u64,
12595        time_boot_ms: 0_u32,
12596        firmware_version: 0_u32,
12597        hardware_version: 0_u32,
12598        roll_min: 0.0_f32,
12599        roll_max: 0.0_f32,
12600        pitch_min: 0.0_f32,
12601        pitch_max: 0.0_f32,
12602        yaw_min: 0.0_f32,
12603        yaw_max: 0.0_f32,
12604        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12605        custom_cap_flags: 0_u16,
12606        vendor_name: [0_u8; 32usize],
12607        model_name: [0_u8; 32usize],
12608        custom_name: [0_u8; 32usize],
12609        gimbal_device_id: 0_u8,
12610    };
12611    #[cfg(feature = "arbitrary")]
12612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12613        use arbitrary::{Arbitrary, Unstructured};
12614        let mut buf = [0u8; 1024];
12615        rng.fill_bytes(&mut buf);
12616        let mut unstructured = Unstructured::new(&buf);
12617        Self::arbitrary(&mut unstructured).unwrap_or_default()
12618    }
12619}
12620impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12621    fn default() -> Self {
12622        Self::DEFAULT.clone()
12623    }
12624}
12625impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12626    type Message = MavMessage;
12627    const ID: u32 = 283u32;
12628    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12629    const EXTRA_CRC: u8 = 74u8;
12630    const ENCODED_LEN: usize = 145usize;
12631    fn deser(
12632        _version: MavlinkVersion,
12633        __input: &[u8],
12634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12635        let avail_len = __input.len();
12636        let mut payload_buf = [0; Self::ENCODED_LEN];
12637        let mut buf = if avail_len < Self::ENCODED_LEN {
12638            payload_buf[0..avail_len].copy_from_slice(__input);
12639            Bytes::new(&payload_buf)
12640        } else {
12641            Bytes::new(__input)
12642        };
12643        let mut __struct = Self::default();
12644        __struct.uid = buf.get_u64_le();
12645        __struct.time_boot_ms = buf.get_u32_le();
12646        __struct.firmware_version = buf.get_u32_le();
12647        __struct.hardware_version = buf.get_u32_le();
12648        __struct.roll_min = buf.get_f32_le();
12649        __struct.roll_max = buf.get_f32_le();
12650        __struct.pitch_min = buf.get_f32_le();
12651        __struct.pitch_max = buf.get_f32_le();
12652        __struct.yaw_min = buf.get_f32_le();
12653        __struct.yaw_max = buf.get_f32_le();
12654        let tmp = buf.get_u16_le();
12655        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12656            tmp & GimbalDeviceCapFlags::all().bits(),
12657        )
12658        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12659            flag_type: "GimbalDeviceCapFlags",
12660            value: tmp as u32,
12661        })?;
12662        __struct.custom_cap_flags = buf.get_u16_le();
12663        for v in &mut __struct.vendor_name {
12664            let val = buf.get_u8();
12665            *v = val;
12666        }
12667        for v in &mut __struct.model_name {
12668            let val = buf.get_u8();
12669            *v = val;
12670        }
12671        for v in &mut __struct.custom_name {
12672            let val = buf.get_u8();
12673            *v = val;
12674        }
12675        __struct.gimbal_device_id = buf.get_u8();
12676        Ok(__struct)
12677    }
12678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12679        let mut __tmp = BytesMut::new(bytes);
12680        #[allow(clippy::absurd_extreme_comparisons)]
12681        #[allow(unused_comparisons)]
12682        if __tmp.remaining() < Self::ENCODED_LEN {
12683            panic!(
12684                "buffer is too small (need {} bytes, but got {})",
12685                Self::ENCODED_LEN,
12686                __tmp.remaining(),
12687            )
12688        }
12689        __tmp.put_u64_le(self.uid);
12690        __tmp.put_u32_le(self.time_boot_ms);
12691        __tmp.put_u32_le(self.firmware_version);
12692        __tmp.put_u32_le(self.hardware_version);
12693        __tmp.put_f32_le(self.roll_min);
12694        __tmp.put_f32_le(self.roll_max);
12695        __tmp.put_f32_le(self.pitch_min);
12696        __tmp.put_f32_le(self.pitch_max);
12697        __tmp.put_f32_le(self.yaw_min);
12698        __tmp.put_f32_le(self.yaw_max);
12699        __tmp.put_u16_le(self.cap_flags.bits());
12700        __tmp.put_u16_le(self.custom_cap_flags);
12701        for val in &self.vendor_name {
12702            __tmp.put_u8(*val);
12703        }
12704        for val in &self.model_name {
12705            __tmp.put_u8(*val);
12706        }
12707        for val in &self.custom_name {
12708            __tmp.put_u8(*val);
12709        }
12710        if matches!(version, MavlinkVersion::V2) {
12711            __tmp.put_u8(self.gimbal_device_id);
12712            let len = __tmp.len();
12713            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12714        } else {
12715            __tmp.len()
12716        }
12717    }
12718}
12719#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12720#[doc = ""]
12721#[doc = "ID: 284"]
12722#[derive(Debug, Clone, PartialEq)]
12723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12725#[cfg_attr(feature = "ts", derive(TS))]
12726#[cfg_attr(feature = "ts", ts(export))]
12727pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12728    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12730    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12731    pub q: [f32; 4],
12732    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12733    pub angular_velocity_x: f32,
12734    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12735    pub angular_velocity_y: f32,
12736    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12737    pub angular_velocity_z: f32,
12738    #[doc = "Low level gimbal flags."]
12739    pub flags: GimbalDeviceFlags,
12740    #[doc = "System ID"]
12741    pub target_system: u8,
12742    #[doc = "Component ID"]
12743    pub target_component: u8,
12744}
12745impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12746    pub const ENCODED_LEN: usize = 32usize;
12747    pub const DEFAULT: Self = Self {
12748        q: [0.0_f32; 4usize],
12749        angular_velocity_x: 0.0_f32,
12750        angular_velocity_y: 0.0_f32,
12751        angular_velocity_z: 0.0_f32,
12752        flags: GimbalDeviceFlags::DEFAULT,
12753        target_system: 0_u8,
12754        target_component: 0_u8,
12755    };
12756    #[cfg(feature = "arbitrary")]
12757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12758        use arbitrary::{Arbitrary, Unstructured};
12759        let mut buf = [0u8; 1024];
12760        rng.fill_bytes(&mut buf);
12761        let mut unstructured = Unstructured::new(&buf);
12762        Self::arbitrary(&mut unstructured).unwrap_or_default()
12763    }
12764}
12765impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12766    fn default() -> Self {
12767        Self::DEFAULT.clone()
12768    }
12769}
12770impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12771    type Message = MavMessage;
12772    const ID: u32 = 284u32;
12773    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12774    const EXTRA_CRC: u8 = 99u8;
12775    const ENCODED_LEN: usize = 32usize;
12776    fn deser(
12777        _version: MavlinkVersion,
12778        __input: &[u8],
12779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12780        let avail_len = __input.len();
12781        let mut payload_buf = [0; Self::ENCODED_LEN];
12782        let mut buf = if avail_len < Self::ENCODED_LEN {
12783            payload_buf[0..avail_len].copy_from_slice(__input);
12784            Bytes::new(&payload_buf)
12785        } else {
12786            Bytes::new(__input)
12787        };
12788        let mut __struct = Self::default();
12789        for v in &mut __struct.q {
12790            let val = buf.get_f32_le();
12791            *v = val;
12792        }
12793        __struct.angular_velocity_x = buf.get_f32_le();
12794        __struct.angular_velocity_y = buf.get_f32_le();
12795        __struct.angular_velocity_z = buf.get_f32_le();
12796        let tmp = buf.get_u16_le();
12797        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12798            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12799                flag_type: "GimbalDeviceFlags",
12800                value: tmp as u32,
12801            })?;
12802        __struct.target_system = buf.get_u8();
12803        __struct.target_component = buf.get_u8();
12804        Ok(__struct)
12805    }
12806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12807        let mut __tmp = BytesMut::new(bytes);
12808        #[allow(clippy::absurd_extreme_comparisons)]
12809        #[allow(unused_comparisons)]
12810        if __tmp.remaining() < Self::ENCODED_LEN {
12811            panic!(
12812                "buffer is too small (need {} bytes, but got {})",
12813                Self::ENCODED_LEN,
12814                __tmp.remaining(),
12815            )
12816        }
12817        for val in &self.q {
12818            __tmp.put_f32_le(*val);
12819        }
12820        __tmp.put_f32_le(self.angular_velocity_x);
12821        __tmp.put_f32_le(self.angular_velocity_y);
12822        __tmp.put_f32_le(self.angular_velocity_z);
12823        __tmp.put_u16_le(self.flags.bits());
12824        __tmp.put_u8(self.target_system);
12825        __tmp.put_u8(self.target_component);
12826        if matches!(version, MavlinkVersion::V2) {
12827            let len = __tmp.len();
12828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12829        } else {
12830            __tmp.len()
12831        }
12832    }
12833}
12834#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12835#[doc = ""]
12836#[doc = "ID: 280"]
12837#[derive(Debug, Clone, PartialEq)]
12838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12840#[cfg_attr(feature = "ts", derive(TS))]
12841#[cfg_attr(feature = "ts", ts(export))]
12842pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12843    #[doc = "Timestamp (time since system boot)."]
12844    pub time_boot_ms: u32,
12845    #[doc = "Bitmap of gimbal capability flags."]
12846    pub cap_flags: GimbalManagerCapFlags,
12847    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12848    pub roll_min: f32,
12849    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12850    pub roll_max: f32,
12851    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12852    pub pitch_min: f32,
12853    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12854    pub pitch_max: f32,
12855    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12856    pub yaw_min: f32,
12857    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12858    pub yaw_max: f32,
12859    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12860    pub gimbal_device_id: u8,
12861}
12862impl GIMBAL_MANAGER_INFORMATION_DATA {
12863    pub const ENCODED_LEN: usize = 33usize;
12864    pub const DEFAULT: Self = Self {
12865        time_boot_ms: 0_u32,
12866        cap_flags: GimbalManagerCapFlags::DEFAULT,
12867        roll_min: 0.0_f32,
12868        roll_max: 0.0_f32,
12869        pitch_min: 0.0_f32,
12870        pitch_max: 0.0_f32,
12871        yaw_min: 0.0_f32,
12872        yaw_max: 0.0_f32,
12873        gimbal_device_id: 0_u8,
12874    };
12875    #[cfg(feature = "arbitrary")]
12876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12877        use arbitrary::{Arbitrary, Unstructured};
12878        let mut buf = [0u8; 1024];
12879        rng.fill_bytes(&mut buf);
12880        let mut unstructured = Unstructured::new(&buf);
12881        Self::arbitrary(&mut unstructured).unwrap_or_default()
12882    }
12883}
12884impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12885    fn default() -> Self {
12886        Self::DEFAULT.clone()
12887    }
12888}
12889impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12890    type Message = MavMessage;
12891    const ID: u32 = 280u32;
12892    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12893    const EXTRA_CRC: u8 = 70u8;
12894    const ENCODED_LEN: usize = 33usize;
12895    fn deser(
12896        _version: MavlinkVersion,
12897        __input: &[u8],
12898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12899        let avail_len = __input.len();
12900        let mut payload_buf = [0; Self::ENCODED_LEN];
12901        let mut buf = if avail_len < Self::ENCODED_LEN {
12902            payload_buf[0..avail_len].copy_from_slice(__input);
12903            Bytes::new(&payload_buf)
12904        } else {
12905            Bytes::new(__input)
12906        };
12907        let mut __struct = Self::default();
12908        __struct.time_boot_ms = buf.get_u32_le();
12909        let tmp = buf.get_u32_le();
12910        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12911            tmp & GimbalManagerCapFlags::all().bits(),
12912        )
12913        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12914            flag_type: "GimbalManagerCapFlags",
12915            value: tmp as u32,
12916        })?;
12917        __struct.roll_min = buf.get_f32_le();
12918        __struct.roll_max = buf.get_f32_le();
12919        __struct.pitch_min = buf.get_f32_le();
12920        __struct.pitch_max = buf.get_f32_le();
12921        __struct.yaw_min = buf.get_f32_le();
12922        __struct.yaw_max = buf.get_f32_le();
12923        __struct.gimbal_device_id = buf.get_u8();
12924        Ok(__struct)
12925    }
12926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12927        let mut __tmp = BytesMut::new(bytes);
12928        #[allow(clippy::absurd_extreme_comparisons)]
12929        #[allow(unused_comparisons)]
12930        if __tmp.remaining() < Self::ENCODED_LEN {
12931            panic!(
12932                "buffer is too small (need {} bytes, but got {})",
12933                Self::ENCODED_LEN,
12934                __tmp.remaining(),
12935            )
12936        }
12937        __tmp.put_u32_le(self.time_boot_ms);
12938        __tmp.put_u32_le(self.cap_flags.bits());
12939        __tmp.put_f32_le(self.roll_min);
12940        __tmp.put_f32_le(self.roll_max);
12941        __tmp.put_f32_le(self.pitch_min);
12942        __tmp.put_f32_le(self.pitch_max);
12943        __tmp.put_f32_le(self.yaw_min);
12944        __tmp.put_f32_le(self.yaw_max);
12945        __tmp.put_u8(self.gimbal_device_id);
12946        if matches!(version, MavlinkVersion::V2) {
12947            let len = __tmp.len();
12948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12949        } else {
12950            __tmp.len()
12951        }
12952    }
12953}
12954#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12955#[doc = ""]
12956#[doc = "ID: 282"]
12957#[derive(Debug, Clone, PartialEq)]
12958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12960#[cfg_attr(feature = "ts", derive(TS))]
12961#[cfg_attr(feature = "ts", ts(export))]
12962pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12963    #[doc = "High level gimbal manager flags to use."]
12964    pub flags: GimbalManagerFlags,
12965    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12966    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12967    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12968    pub q: [f32; 4],
12969    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12970    pub angular_velocity_x: f32,
12971    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12972    pub angular_velocity_y: f32,
12973    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12974    pub angular_velocity_z: f32,
12975    #[doc = "System ID"]
12976    pub target_system: u8,
12977    #[doc = "Component ID"]
12978    pub target_component: u8,
12979    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12980    pub gimbal_device_id: u8,
12981}
12982impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12983    pub const ENCODED_LEN: usize = 35usize;
12984    pub const DEFAULT: Self = Self {
12985        flags: GimbalManagerFlags::DEFAULT,
12986        q: [0.0_f32; 4usize],
12987        angular_velocity_x: 0.0_f32,
12988        angular_velocity_y: 0.0_f32,
12989        angular_velocity_z: 0.0_f32,
12990        target_system: 0_u8,
12991        target_component: 0_u8,
12992        gimbal_device_id: 0_u8,
12993    };
12994    #[cfg(feature = "arbitrary")]
12995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12996        use arbitrary::{Arbitrary, Unstructured};
12997        let mut buf = [0u8; 1024];
12998        rng.fill_bytes(&mut buf);
12999        let mut unstructured = Unstructured::new(&buf);
13000        Self::arbitrary(&mut unstructured).unwrap_or_default()
13001    }
13002}
13003impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13004    fn default() -> Self {
13005        Self::DEFAULT.clone()
13006    }
13007}
13008impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13009    type Message = MavMessage;
13010    const ID: u32 = 282u32;
13011    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13012    const EXTRA_CRC: u8 = 123u8;
13013    const ENCODED_LEN: usize = 35usize;
13014    fn deser(
13015        _version: MavlinkVersion,
13016        __input: &[u8],
13017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13018        let avail_len = __input.len();
13019        let mut payload_buf = [0; Self::ENCODED_LEN];
13020        let mut buf = if avail_len < Self::ENCODED_LEN {
13021            payload_buf[0..avail_len].copy_from_slice(__input);
13022            Bytes::new(&payload_buf)
13023        } else {
13024            Bytes::new(__input)
13025        };
13026        let mut __struct = Self::default();
13027        let tmp = buf.get_u32_le();
13028        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13029            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13030                flag_type: "GimbalManagerFlags",
13031                value: tmp as u32,
13032            })?;
13033        for v in &mut __struct.q {
13034            let val = buf.get_f32_le();
13035            *v = val;
13036        }
13037        __struct.angular_velocity_x = buf.get_f32_le();
13038        __struct.angular_velocity_y = buf.get_f32_le();
13039        __struct.angular_velocity_z = buf.get_f32_le();
13040        __struct.target_system = buf.get_u8();
13041        __struct.target_component = buf.get_u8();
13042        __struct.gimbal_device_id = buf.get_u8();
13043        Ok(__struct)
13044    }
13045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13046        let mut __tmp = BytesMut::new(bytes);
13047        #[allow(clippy::absurd_extreme_comparisons)]
13048        #[allow(unused_comparisons)]
13049        if __tmp.remaining() < Self::ENCODED_LEN {
13050            panic!(
13051                "buffer is too small (need {} bytes, but got {})",
13052                Self::ENCODED_LEN,
13053                __tmp.remaining(),
13054            )
13055        }
13056        __tmp.put_u32_le(self.flags.bits());
13057        for val in &self.q {
13058            __tmp.put_f32_le(*val);
13059        }
13060        __tmp.put_f32_le(self.angular_velocity_x);
13061        __tmp.put_f32_le(self.angular_velocity_y);
13062        __tmp.put_f32_le(self.angular_velocity_z);
13063        __tmp.put_u8(self.target_system);
13064        __tmp.put_u8(self.target_component);
13065        __tmp.put_u8(self.gimbal_device_id);
13066        if matches!(version, MavlinkVersion::V2) {
13067            let len = __tmp.len();
13068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13069        } else {
13070            __tmp.len()
13071        }
13072    }
13073}
13074#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13075#[doc = ""]
13076#[doc = "ID: 288"]
13077#[derive(Debug, Clone, PartialEq)]
13078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13080#[cfg_attr(feature = "ts", derive(TS))]
13081#[cfg_attr(feature = "ts", ts(export))]
13082pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13083    #[doc = "High level gimbal manager flags."]
13084    pub flags: GimbalManagerFlags,
13085    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13086    pub pitch: f32,
13087    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13088    pub yaw: f32,
13089    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13090    pub pitch_rate: f32,
13091    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13092    pub yaw_rate: f32,
13093    #[doc = "System ID"]
13094    pub target_system: u8,
13095    #[doc = "Component ID"]
13096    pub target_component: u8,
13097    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13098    pub gimbal_device_id: u8,
13099}
13100impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13101    pub const ENCODED_LEN: usize = 23usize;
13102    pub const DEFAULT: Self = Self {
13103        flags: GimbalManagerFlags::DEFAULT,
13104        pitch: 0.0_f32,
13105        yaw: 0.0_f32,
13106        pitch_rate: 0.0_f32,
13107        yaw_rate: 0.0_f32,
13108        target_system: 0_u8,
13109        target_component: 0_u8,
13110        gimbal_device_id: 0_u8,
13111    };
13112    #[cfg(feature = "arbitrary")]
13113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13114        use arbitrary::{Arbitrary, Unstructured};
13115        let mut buf = [0u8; 1024];
13116        rng.fill_bytes(&mut buf);
13117        let mut unstructured = Unstructured::new(&buf);
13118        Self::arbitrary(&mut unstructured).unwrap_or_default()
13119    }
13120}
13121impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13122    fn default() -> Self {
13123        Self::DEFAULT.clone()
13124    }
13125}
13126impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13127    type Message = MavMessage;
13128    const ID: u32 = 288u32;
13129    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13130    const EXTRA_CRC: u8 = 20u8;
13131    const ENCODED_LEN: usize = 23usize;
13132    fn deser(
13133        _version: MavlinkVersion,
13134        __input: &[u8],
13135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13136        let avail_len = __input.len();
13137        let mut payload_buf = [0; Self::ENCODED_LEN];
13138        let mut buf = if avail_len < Self::ENCODED_LEN {
13139            payload_buf[0..avail_len].copy_from_slice(__input);
13140            Bytes::new(&payload_buf)
13141        } else {
13142            Bytes::new(__input)
13143        };
13144        let mut __struct = Self::default();
13145        let tmp = buf.get_u32_le();
13146        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13147            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13148                flag_type: "GimbalManagerFlags",
13149                value: tmp as u32,
13150            })?;
13151        __struct.pitch = buf.get_f32_le();
13152        __struct.yaw = buf.get_f32_le();
13153        __struct.pitch_rate = buf.get_f32_le();
13154        __struct.yaw_rate = buf.get_f32_le();
13155        __struct.target_system = buf.get_u8();
13156        __struct.target_component = buf.get_u8();
13157        __struct.gimbal_device_id = buf.get_u8();
13158        Ok(__struct)
13159    }
13160    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13161        let mut __tmp = BytesMut::new(bytes);
13162        #[allow(clippy::absurd_extreme_comparisons)]
13163        #[allow(unused_comparisons)]
13164        if __tmp.remaining() < Self::ENCODED_LEN {
13165            panic!(
13166                "buffer is too small (need {} bytes, but got {})",
13167                Self::ENCODED_LEN,
13168                __tmp.remaining(),
13169            )
13170        }
13171        __tmp.put_u32_le(self.flags.bits());
13172        __tmp.put_f32_le(self.pitch);
13173        __tmp.put_f32_le(self.yaw);
13174        __tmp.put_f32_le(self.pitch_rate);
13175        __tmp.put_f32_le(self.yaw_rate);
13176        __tmp.put_u8(self.target_system);
13177        __tmp.put_u8(self.target_component);
13178        __tmp.put_u8(self.gimbal_device_id);
13179        if matches!(version, MavlinkVersion::V2) {
13180            let len = __tmp.len();
13181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13182        } else {
13183            __tmp.len()
13184        }
13185    }
13186}
13187#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13188#[doc = ""]
13189#[doc = "ID: 287"]
13190#[derive(Debug, Clone, PartialEq)]
13191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13193#[cfg_attr(feature = "ts", derive(TS))]
13194#[cfg_attr(feature = "ts", ts(export))]
13195pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13196    #[doc = "High level gimbal manager flags to use."]
13197    pub flags: GimbalManagerFlags,
13198    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13199    pub pitch: f32,
13200    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13201    pub yaw: f32,
13202    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13203    pub pitch_rate: f32,
13204    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13205    pub yaw_rate: f32,
13206    #[doc = "System ID"]
13207    pub target_system: u8,
13208    #[doc = "Component ID"]
13209    pub target_component: u8,
13210    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13211    pub gimbal_device_id: u8,
13212}
13213impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13214    pub const ENCODED_LEN: usize = 23usize;
13215    pub const DEFAULT: Self = Self {
13216        flags: GimbalManagerFlags::DEFAULT,
13217        pitch: 0.0_f32,
13218        yaw: 0.0_f32,
13219        pitch_rate: 0.0_f32,
13220        yaw_rate: 0.0_f32,
13221        target_system: 0_u8,
13222        target_component: 0_u8,
13223        gimbal_device_id: 0_u8,
13224    };
13225    #[cfg(feature = "arbitrary")]
13226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13227        use arbitrary::{Arbitrary, Unstructured};
13228        let mut buf = [0u8; 1024];
13229        rng.fill_bytes(&mut buf);
13230        let mut unstructured = Unstructured::new(&buf);
13231        Self::arbitrary(&mut unstructured).unwrap_or_default()
13232    }
13233}
13234impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13235    fn default() -> Self {
13236        Self::DEFAULT.clone()
13237    }
13238}
13239impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13240    type Message = MavMessage;
13241    const ID: u32 = 287u32;
13242    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13243    const EXTRA_CRC: u8 = 1u8;
13244    const ENCODED_LEN: usize = 23usize;
13245    fn deser(
13246        _version: MavlinkVersion,
13247        __input: &[u8],
13248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13249        let avail_len = __input.len();
13250        let mut payload_buf = [0; Self::ENCODED_LEN];
13251        let mut buf = if avail_len < Self::ENCODED_LEN {
13252            payload_buf[0..avail_len].copy_from_slice(__input);
13253            Bytes::new(&payload_buf)
13254        } else {
13255            Bytes::new(__input)
13256        };
13257        let mut __struct = Self::default();
13258        let tmp = buf.get_u32_le();
13259        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13260            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13261                flag_type: "GimbalManagerFlags",
13262                value: tmp as u32,
13263            })?;
13264        __struct.pitch = buf.get_f32_le();
13265        __struct.yaw = buf.get_f32_le();
13266        __struct.pitch_rate = buf.get_f32_le();
13267        __struct.yaw_rate = buf.get_f32_le();
13268        __struct.target_system = buf.get_u8();
13269        __struct.target_component = buf.get_u8();
13270        __struct.gimbal_device_id = buf.get_u8();
13271        Ok(__struct)
13272    }
13273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13274        let mut __tmp = BytesMut::new(bytes);
13275        #[allow(clippy::absurd_extreme_comparisons)]
13276        #[allow(unused_comparisons)]
13277        if __tmp.remaining() < Self::ENCODED_LEN {
13278            panic!(
13279                "buffer is too small (need {} bytes, but got {})",
13280                Self::ENCODED_LEN,
13281                __tmp.remaining(),
13282            )
13283        }
13284        __tmp.put_u32_le(self.flags.bits());
13285        __tmp.put_f32_le(self.pitch);
13286        __tmp.put_f32_le(self.yaw);
13287        __tmp.put_f32_le(self.pitch_rate);
13288        __tmp.put_f32_le(self.yaw_rate);
13289        __tmp.put_u8(self.target_system);
13290        __tmp.put_u8(self.target_component);
13291        __tmp.put_u8(self.gimbal_device_id);
13292        if matches!(version, MavlinkVersion::V2) {
13293            let len = __tmp.len();
13294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13295        } else {
13296            __tmp.len()
13297        }
13298    }
13299}
13300#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13301#[doc = ""]
13302#[doc = "ID: 281"]
13303#[derive(Debug, Clone, PartialEq)]
13304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13306#[cfg_attr(feature = "ts", derive(TS))]
13307#[cfg_attr(feature = "ts", ts(export))]
13308pub struct GIMBAL_MANAGER_STATUS_DATA {
13309    #[doc = "Timestamp (time since system boot)."]
13310    pub time_boot_ms: u32,
13311    #[doc = "High level gimbal manager flags currently applied."]
13312    pub flags: GimbalManagerFlags,
13313    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13314    pub gimbal_device_id: u8,
13315    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13316    pub primary_control_sysid: u8,
13317    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13318    pub primary_control_compid: u8,
13319    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13320    pub secondary_control_sysid: u8,
13321    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13322    pub secondary_control_compid: u8,
13323}
13324impl GIMBAL_MANAGER_STATUS_DATA {
13325    pub const ENCODED_LEN: usize = 13usize;
13326    pub const DEFAULT: Self = Self {
13327        time_boot_ms: 0_u32,
13328        flags: GimbalManagerFlags::DEFAULT,
13329        gimbal_device_id: 0_u8,
13330        primary_control_sysid: 0_u8,
13331        primary_control_compid: 0_u8,
13332        secondary_control_sysid: 0_u8,
13333        secondary_control_compid: 0_u8,
13334    };
13335    #[cfg(feature = "arbitrary")]
13336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13337        use arbitrary::{Arbitrary, Unstructured};
13338        let mut buf = [0u8; 1024];
13339        rng.fill_bytes(&mut buf);
13340        let mut unstructured = Unstructured::new(&buf);
13341        Self::arbitrary(&mut unstructured).unwrap_or_default()
13342    }
13343}
13344impl Default for GIMBAL_MANAGER_STATUS_DATA {
13345    fn default() -> Self {
13346        Self::DEFAULT.clone()
13347    }
13348}
13349impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13350    type Message = MavMessage;
13351    const ID: u32 = 281u32;
13352    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13353    const EXTRA_CRC: u8 = 48u8;
13354    const ENCODED_LEN: usize = 13usize;
13355    fn deser(
13356        _version: MavlinkVersion,
13357        __input: &[u8],
13358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13359        let avail_len = __input.len();
13360        let mut payload_buf = [0; Self::ENCODED_LEN];
13361        let mut buf = if avail_len < Self::ENCODED_LEN {
13362            payload_buf[0..avail_len].copy_from_slice(__input);
13363            Bytes::new(&payload_buf)
13364        } else {
13365            Bytes::new(__input)
13366        };
13367        let mut __struct = Self::default();
13368        __struct.time_boot_ms = buf.get_u32_le();
13369        let tmp = buf.get_u32_le();
13370        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13371            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13372                flag_type: "GimbalManagerFlags",
13373                value: tmp as u32,
13374            })?;
13375        __struct.gimbal_device_id = buf.get_u8();
13376        __struct.primary_control_sysid = buf.get_u8();
13377        __struct.primary_control_compid = buf.get_u8();
13378        __struct.secondary_control_sysid = buf.get_u8();
13379        __struct.secondary_control_compid = buf.get_u8();
13380        Ok(__struct)
13381    }
13382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13383        let mut __tmp = BytesMut::new(bytes);
13384        #[allow(clippy::absurd_extreme_comparisons)]
13385        #[allow(unused_comparisons)]
13386        if __tmp.remaining() < Self::ENCODED_LEN {
13387            panic!(
13388                "buffer is too small (need {} bytes, but got {})",
13389                Self::ENCODED_LEN,
13390                __tmp.remaining(),
13391            )
13392        }
13393        __tmp.put_u32_le(self.time_boot_ms);
13394        __tmp.put_u32_le(self.flags.bits());
13395        __tmp.put_u8(self.gimbal_device_id);
13396        __tmp.put_u8(self.primary_control_sysid);
13397        __tmp.put_u8(self.primary_control_compid);
13398        __tmp.put_u8(self.secondary_control_sysid);
13399        __tmp.put_u8(self.secondary_control_compid);
13400        if matches!(version, MavlinkVersion::V2) {
13401            let len = __tmp.len();
13402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13403        } else {
13404            __tmp.len()
13405        }
13406    }
13407}
13408#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13409#[doc = ""]
13410#[doc = "ID: 33"]
13411#[derive(Debug, Clone, PartialEq)]
13412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13414#[cfg_attr(feature = "ts", derive(TS))]
13415#[cfg_attr(feature = "ts", ts(export))]
13416pub struct GLOBAL_POSITION_INT_DATA {
13417    #[doc = "Timestamp (time since system boot)."]
13418    pub time_boot_ms: u32,
13419    #[doc = "Latitude, expressed"]
13420    pub lat: i32,
13421    #[doc = "Longitude, expressed"]
13422    pub lon: i32,
13423    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13424    pub alt: i32,
13425    #[doc = "Altitude above home"]
13426    pub relative_alt: i32,
13427    #[doc = "Ground X Speed (Latitude, positive north)"]
13428    pub vx: i16,
13429    #[doc = "Ground Y Speed (Longitude, positive east)"]
13430    pub vy: i16,
13431    #[doc = "Ground Z Speed (Altitude, positive down)"]
13432    pub vz: i16,
13433    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13434    pub hdg: u16,
13435}
13436impl GLOBAL_POSITION_INT_DATA {
13437    pub const ENCODED_LEN: usize = 28usize;
13438    pub const DEFAULT: Self = Self {
13439        time_boot_ms: 0_u32,
13440        lat: 0_i32,
13441        lon: 0_i32,
13442        alt: 0_i32,
13443        relative_alt: 0_i32,
13444        vx: 0_i16,
13445        vy: 0_i16,
13446        vz: 0_i16,
13447        hdg: 0_u16,
13448    };
13449    #[cfg(feature = "arbitrary")]
13450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13451        use arbitrary::{Arbitrary, Unstructured};
13452        let mut buf = [0u8; 1024];
13453        rng.fill_bytes(&mut buf);
13454        let mut unstructured = Unstructured::new(&buf);
13455        Self::arbitrary(&mut unstructured).unwrap_or_default()
13456    }
13457}
13458impl Default for GLOBAL_POSITION_INT_DATA {
13459    fn default() -> Self {
13460        Self::DEFAULT.clone()
13461    }
13462}
13463impl MessageData for GLOBAL_POSITION_INT_DATA {
13464    type Message = MavMessage;
13465    const ID: u32 = 33u32;
13466    const NAME: &'static str = "GLOBAL_POSITION_INT";
13467    const EXTRA_CRC: u8 = 104u8;
13468    const ENCODED_LEN: usize = 28usize;
13469    fn deser(
13470        _version: MavlinkVersion,
13471        __input: &[u8],
13472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13473        let avail_len = __input.len();
13474        let mut payload_buf = [0; Self::ENCODED_LEN];
13475        let mut buf = if avail_len < Self::ENCODED_LEN {
13476            payload_buf[0..avail_len].copy_from_slice(__input);
13477            Bytes::new(&payload_buf)
13478        } else {
13479            Bytes::new(__input)
13480        };
13481        let mut __struct = Self::default();
13482        __struct.time_boot_ms = buf.get_u32_le();
13483        __struct.lat = buf.get_i32_le();
13484        __struct.lon = buf.get_i32_le();
13485        __struct.alt = buf.get_i32_le();
13486        __struct.relative_alt = buf.get_i32_le();
13487        __struct.vx = buf.get_i16_le();
13488        __struct.vy = buf.get_i16_le();
13489        __struct.vz = buf.get_i16_le();
13490        __struct.hdg = buf.get_u16_le();
13491        Ok(__struct)
13492    }
13493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13494        let mut __tmp = BytesMut::new(bytes);
13495        #[allow(clippy::absurd_extreme_comparisons)]
13496        #[allow(unused_comparisons)]
13497        if __tmp.remaining() < Self::ENCODED_LEN {
13498            panic!(
13499                "buffer is too small (need {} bytes, but got {})",
13500                Self::ENCODED_LEN,
13501                __tmp.remaining(),
13502            )
13503        }
13504        __tmp.put_u32_le(self.time_boot_ms);
13505        __tmp.put_i32_le(self.lat);
13506        __tmp.put_i32_le(self.lon);
13507        __tmp.put_i32_le(self.alt);
13508        __tmp.put_i32_le(self.relative_alt);
13509        __tmp.put_i16_le(self.vx);
13510        __tmp.put_i16_le(self.vy);
13511        __tmp.put_i16_le(self.vz);
13512        __tmp.put_u16_le(self.hdg);
13513        if matches!(version, MavlinkVersion::V2) {
13514            let len = __tmp.len();
13515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13516        } else {
13517            __tmp.len()
13518        }
13519    }
13520}
13521#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13522#[doc = ""]
13523#[doc = "ID: 63"]
13524#[derive(Debug, Clone, PartialEq)]
13525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13527#[cfg_attr(feature = "ts", derive(TS))]
13528#[cfg_attr(feature = "ts", ts(export))]
13529pub struct GLOBAL_POSITION_INT_COV_DATA {
13530    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13531    pub time_usec: u64,
13532    #[doc = "Latitude"]
13533    pub lat: i32,
13534    #[doc = "Longitude"]
13535    pub lon: i32,
13536    #[doc = "Altitude in meters above MSL"]
13537    pub alt: i32,
13538    #[doc = "Altitude above ground"]
13539    pub relative_alt: i32,
13540    #[doc = "Ground X Speed (Latitude)"]
13541    pub vx: f32,
13542    #[doc = "Ground Y Speed (Longitude)"]
13543    pub vy: f32,
13544    #[doc = "Ground Z Speed (Altitude)"]
13545    pub vz: f32,
13546    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13547    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13548    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13549    pub covariance: [f32; 36],
13550    #[doc = "Class id of the estimator this estimate originated from."]
13551    pub estimator_type: MavEstimatorType,
13552}
13553impl GLOBAL_POSITION_INT_COV_DATA {
13554    pub const ENCODED_LEN: usize = 181usize;
13555    pub const DEFAULT: Self = Self {
13556        time_usec: 0_u64,
13557        lat: 0_i32,
13558        lon: 0_i32,
13559        alt: 0_i32,
13560        relative_alt: 0_i32,
13561        vx: 0.0_f32,
13562        vy: 0.0_f32,
13563        vz: 0.0_f32,
13564        covariance: [0.0_f32; 36usize],
13565        estimator_type: MavEstimatorType::DEFAULT,
13566    };
13567    #[cfg(feature = "arbitrary")]
13568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13569        use arbitrary::{Arbitrary, Unstructured};
13570        let mut buf = [0u8; 1024];
13571        rng.fill_bytes(&mut buf);
13572        let mut unstructured = Unstructured::new(&buf);
13573        Self::arbitrary(&mut unstructured).unwrap_or_default()
13574    }
13575}
13576impl Default for GLOBAL_POSITION_INT_COV_DATA {
13577    fn default() -> Self {
13578        Self::DEFAULT.clone()
13579    }
13580}
13581impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13582    type Message = MavMessage;
13583    const ID: u32 = 63u32;
13584    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13585    const EXTRA_CRC: u8 = 119u8;
13586    const ENCODED_LEN: usize = 181usize;
13587    fn deser(
13588        _version: MavlinkVersion,
13589        __input: &[u8],
13590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13591        let avail_len = __input.len();
13592        let mut payload_buf = [0; Self::ENCODED_LEN];
13593        let mut buf = if avail_len < Self::ENCODED_LEN {
13594            payload_buf[0..avail_len].copy_from_slice(__input);
13595            Bytes::new(&payload_buf)
13596        } else {
13597            Bytes::new(__input)
13598        };
13599        let mut __struct = Self::default();
13600        __struct.time_usec = buf.get_u64_le();
13601        __struct.lat = buf.get_i32_le();
13602        __struct.lon = buf.get_i32_le();
13603        __struct.alt = buf.get_i32_le();
13604        __struct.relative_alt = buf.get_i32_le();
13605        __struct.vx = buf.get_f32_le();
13606        __struct.vy = buf.get_f32_le();
13607        __struct.vz = buf.get_f32_le();
13608        for v in &mut __struct.covariance {
13609            let val = buf.get_f32_le();
13610            *v = val;
13611        }
13612        let tmp = buf.get_u8();
13613        __struct.estimator_type =
13614            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13615                enum_type: "MavEstimatorType",
13616                value: tmp as u32,
13617            })?;
13618        Ok(__struct)
13619    }
13620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13621        let mut __tmp = BytesMut::new(bytes);
13622        #[allow(clippy::absurd_extreme_comparisons)]
13623        #[allow(unused_comparisons)]
13624        if __tmp.remaining() < Self::ENCODED_LEN {
13625            panic!(
13626                "buffer is too small (need {} bytes, but got {})",
13627                Self::ENCODED_LEN,
13628                __tmp.remaining(),
13629            )
13630        }
13631        __tmp.put_u64_le(self.time_usec);
13632        __tmp.put_i32_le(self.lat);
13633        __tmp.put_i32_le(self.lon);
13634        __tmp.put_i32_le(self.alt);
13635        __tmp.put_i32_le(self.relative_alt);
13636        __tmp.put_f32_le(self.vx);
13637        __tmp.put_f32_le(self.vy);
13638        __tmp.put_f32_le(self.vz);
13639        for val in &self.covariance {
13640            __tmp.put_f32_le(*val);
13641        }
13642        __tmp.put_u8(self.estimator_type as u8);
13643        if matches!(version, MavlinkVersion::V2) {
13644            let len = __tmp.len();
13645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13646        } else {
13647            __tmp.len()
13648        }
13649    }
13650}
13651#[doc = "Global position/attitude estimate from a vision source."]
13652#[doc = ""]
13653#[doc = "ID: 101"]
13654#[derive(Debug, Clone, PartialEq)]
13655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13657#[cfg_attr(feature = "ts", derive(TS))]
13658#[cfg_attr(feature = "ts", ts(export))]
13659pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13660    #[doc = "Timestamp (UNIX time or since system boot)"]
13661    pub usec: u64,
13662    #[doc = "Global X position"]
13663    pub x: f32,
13664    #[doc = "Global Y position"]
13665    pub y: f32,
13666    #[doc = "Global Z position"]
13667    pub z: f32,
13668    #[doc = "Roll angle"]
13669    pub roll: f32,
13670    #[doc = "Pitch angle"]
13671    pub pitch: f32,
13672    #[doc = "Yaw angle"]
13673    pub yaw: f32,
13674    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13675    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13677    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13678    pub covariance: [f32; 21],
13679    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13681    pub reset_counter: u8,
13682}
13683impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13684    pub const ENCODED_LEN: usize = 117usize;
13685    pub const DEFAULT: Self = Self {
13686        usec: 0_u64,
13687        x: 0.0_f32,
13688        y: 0.0_f32,
13689        z: 0.0_f32,
13690        roll: 0.0_f32,
13691        pitch: 0.0_f32,
13692        yaw: 0.0_f32,
13693        covariance: [0.0_f32; 21usize],
13694        reset_counter: 0_u8,
13695    };
13696    #[cfg(feature = "arbitrary")]
13697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13698        use arbitrary::{Arbitrary, Unstructured};
13699        let mut buf = [0u8; 1024];
13700        rng.fill_bytes(&mut buf);
13701        let mut unstructured = Unstructured::new(&buf);
13702        Self::arbitrary(&mut unstructured).unwrap_or_default()
13703    }
13704}
13705impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13706    fn default() -> Self {
13707        Self::DEFAULT.clone()
13708    }
13709}
13710impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13711    type Message = MavMessage;
13712    const ID: u32 = 101u32;
13713    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13714    const EXTRA_CRC: u8 = 102u8;
13715    const ENCODED_LEN: usize = 117usize;
13716    fn deser(
13717        _version: MavlinkVersion,
13718        __input: &[u8],
13719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13720        let avail_len = __input.len();
13721        let mut payload_buf = [0; Self::ENCODED_LEN];
13722        let mut buf = if avail_len < Self::ENCODED_LEN {
13723            payload_buf[0..avail_len].copy_from_slice(__input);
13724            Bytes::new(&payload_buf)
13725        } else {
13726            Bytes::new(__input)
13727        };
13728        let mut __struct = Self::default();
13729        __struct.usec = buf.get_u64_le();
13730        __struct.x = buf.get_f32_le();
13731        __struct.y = buf.get_f32_le();
13732        __struct.z = buf.get_f32_le();
13733        __struct.roll = buf.get_f32_le();
13734        __struct.pitch = buf.get_f32_le();
13735        __struct.yaw = buf.get_f32_le();
13736        for v in &mut __struct.covariance {
13737            let val = buf.get_f32_le();
13738            *v = val;
13739        }
13740        __struct.reset_counter = buf.get_u8();
13741        Ok(__struct)
13742    }
13743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13744        let mut __tmp = BytesMut::new(bytes);
13745        #[allow(clippy::absurd_extreme_comparisons)]
13746        #[allow(unused_comparisons)]
13747        if __tmp.remaining() < Self::ENCODED_LEN {
13748            panic!(
13749                "buffer is too small (need {} bytes, but got {})",
13750                Self::ENCODED_LEN,
13751                __tmp.remaining(),
13752            )
13753        }
13754        __tmp.put_u64_le(self.usec);
13755        __tmp.put_f32_le(self.x);
13756        __tmp.put_f32_le(self.y);
13757        __tmp.put_f32_le(self.z);
13758        __tmp.put_f32_le(self.roll);
13759        __tmp.put_f32_le(self.pitch);
13760        __tmp.put_f32_le(self.yaw);
13761        if matches!(version, MavlinkVersion::V2) {
13762            for val in &self.covariance {
13763                __tmp.put_f32_le(*val);
13764            }
13765            __tmp.put_u8(self.reset_counter);
13766            let len = __tmp.len();
13767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13768        } else {
13769            __tmp.len()
13770        }
13771    }
13772}
13773#[doc = "Second GPS data."]
13774#[doc = ""]
13775#[doc = "ID: 124"]
13776#[derive(Debug, Clone, PartialEq)]
13777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13779#[cfg_attr(feature = "ts", derive(TS))]
13780#[cfg_attr(feature = "ts", ts(export))]
13781pub struct GPS2_RAW_DATA {
13782    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13783    pub time_usec: u64,
13784    #[doc = "Latitude (WGS84)"]
13785    pub lat: i32,
13786    #[doc = "Longitude (WGS84)"]
13787    pub lon: i32,
13788    #[doc = "Altitude (MSL). Positive for up."]
13789    pub alt: i32,
13790    #[doc = "Age of DGPS info"]
13791    pub dgps_age: u32,
13792    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13793    pub eph: u16,
13794    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13795    pub epv: u16,
13796    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13797    pub vel: u16,
13798    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13799    pub cog: u16,
13800    #[doc = "GPS fix type."]
13801    pub fix_type: GpsFixType,
13802    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13803    pub satellites_visible: u8,
13804    #[doc = "Number of DGPS satellites"]
13805    pub dgps_numch: u8,
13806    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13808    pub yaw: u16,
13809    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13811    pub alt_ellipsoid: i32,
13812    #[doc = "Position uncertainty."]
13813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13814    pub h_acc: u32,
13815    #[doc = "Altitude uncertainty."]
13816    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13817    pub v_acc: u32,
13818    #[doc = "Speed uncertainty."]
13819    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13820    pub vel_acc: u32,
13821    #[doc = "Heading / track uncertainty"]
13822    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13823    pub hdg_acc: u32,
13824}
13825impl GPS2_RAW_DATA {
13826    pub const ENCODED_LEN: usize = 57usize;
13827    pub const DEFAULT: Self = Self {
13828        time_usec: 0_u64,
13829        lat: 0_i32,
13830        lon: 0_i32,
13831        alt: 0_i32,
13832        dgps_age: 0_u32,
13833        eph: 0_u16,
13834        epv: 0_u16,
13835        vel: 0_u16,
13836        cog: 0_u16,
13837        fix_type: GpsFixType::DEFAULT,
13838        satellites_visible: 0_u8,
13839        dgps_numch: 0_u8,
13840        yaw: 0_u16,
13841        alt_ellipsoid: 0_i32,
13842        h_acc: 0_u32,
13843        v_acc: 0_u32,
13844        vel_acc: 0_u32,
13845        hdg_acc: 0_u32,
13846    };
13847    #[cfg(feature = "arbitrary")]
13848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13849        use arbitrary::{Arbitrary, Unstructured};
13850        let mut buf = [0u8; 1024];
13851        rng.fill_bytes(&mut buf);
13852        let mut unstructured = Unstructured::new(&buf);
13853        Self::arbitrary(&mut unstructured).unwrap_or_default()
13854    }
13855}
13856impl Default for GPS2_RAW_DATA {
13857    fn default() -> Self {
13858        Self::DEFAULT.clone()
13859    }
13860}
13861impl MessageData for GPS2_RAW_DATA {
13862    type Message = MavMessage;
13863    const ID: u32 = 124u32;
13864    const NAME: &'static str = "GPS2_RAW";
13865    const EXTRA_CRC: u8 = 87u8;
13866    const ENCODED_LEN: usize = 57usize;
13867    fn deser(
13868        _version: MavlinkVersion,
13869        __input: &[u8],
13870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13871        let avail_len = __input.len();
13872        let mut payload_buf = [0; Self::ENCODED_LEN];
13873        let mut buf = if avail_len < Self::ENCODED_LEN {
13874            payload_buf[0..avail_len].copy_from_slice(__input);
13875            Bytes::new(&payload_buf)
13876        } else {
13877            Bytes::new(__input)
13878        };
13879        let mut __struct = Self::default();
13880        __struct.time_usec = buf.get_u64_le();
13881        __struct.lat = buf.get_i32_le();
13882        __struct.lon = buf.get_i32_le();
13883        __struct.alt = buf.get_i32_le();
13884        __struct.dgps_age = buf.get_u32_le();
13885        __struct.eph = buf.get_u16_le();
13886        __struct.epv = buf.get_u16_le();
13887        __struct.vel = buf.get_u16_le();
13888        __struct.cog = buf.get_u16_le();
13889        let tmp = buf.get_u8();
13890        __struct.fix_type =
13891            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13892                enum_type: "GpsFixType",
13893                value: tmp as u32,
13894            })?;
13895        __struct.satellites_visible = buf.get_u8();
13896        __struct.dgps_numch = buf.get_u8();
13897        __struct.yaw = buf.get_u16_le();
13898        __struct.alt_ellipsoid = buf.get_i32_le();
13899        __struct.h_acc = buf.get_u32_le();
13900        __struct.v_acc = buf.get_u32_le();
13901        __struct.vel_acc = buf.get_u32_le();
13902        __struct.hdg_acc = buf.get_u32_le();
13903        Ok(__struct)
13904    }
13905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13906        let mut __tmp = BytesMut::new(bytes);
13907        #[allow(clippy::absurd_extreme_comparisons)]
13908        #[allow(unused_comparisons)]
13909        if __tmp.remaining() < Self::ENCODED_LEN {
13910            panic!(
13911                "buffer is too small (need {} bytes, but got {})",
13912                Self::ENCODED_LEN,
13913                __tmp.remaining(),
13914            )
13915        }
13916        __tmp.put_u64_le(self.time_usec);
13917        __tmp.put_i32_le(self.lat);
13918        __tmp.put_i32_le(self.lon);
13919        __tmp.put_i32_le(self.alt);
13920        __tmp.put_u32_le(self.dgps_age);
13921        __tmp.put_u16_le(self.eph);
13922        __tmp.put_u16_le(self.epv);
13923        __tmp.put_u16_le(self.vel);
13924        __tmp.put_u16_le(self.cog);
13925        __tmp.put_u8(self.fix_type as u8);
13926        __tmp.put_u8(self.satellites_visible);
13927        __tmp.put_u8(self.dgps_numch);
13928        if matches!(version, MavlinkVersion::V2) {
13929            __tmp.put_u16_le(self.yaw);
13930            __tmp.put_i32_le(self.alt_ellipsoid);
13931            __tmp.put_u32_le(self.h_acc);
13932            __tmp.put_u32_le(self.v_acc);
13933            __tmp.put_u32_le(self.vel_acc);
13934            __tmp.put_u32_le(self.hdg_acc);
13935            let len = __tmp.len();
13936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13937        } else {
13938            __tmp.len()
13939        }
13940    }
13941}
13942#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13943#[doc = ""]
13944#[doc = "ID: 128"]
13945#[derive(Debug, Clone, PartialEq)]
13946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13948#[cfg_attr(feature = "ts", derive(TS))]
13949#[cfg_attr(feature = "ts", ts(export))]
13950pub struct GPS2_RTK_DATA {
13951    #[doc = "Time since boot of last baseline message received."]
13952    pub time_last_baseline_ms: u32,
13953    #[doc = "GPS Time of Week of last baseline"]
13954    pub tow: u32,
13955    #[doc = "Current baseline in ECEF x or NED north component."]
13956    pub baseline_a_mm: i32,
13957    #[doc = "Current baseline in ECEF y or NED east component."]
13958    pub baseline_b_mm: i32,
13959    #[doc = "Current baseline in ECEF z or NED down component."]
13960    pub baseline_c_mm: i32,
13961    #[doc = "Current estimate of baseline accuracy."]
13962    pub accuracy: u32,
13963    #[doc = "Current number of integer ambiguity hypotheses."]
13964    pub iar_num_hypotheses: i32,
13965    #[doc = "GPS Week Number of last baseline"]
13966    pub wn: u16,
13967    #[doc = "Identification of connected RTK receiver."]
13968    pub rtk_receiver_id: u8,
13969    #[doc = "GPS-specific health report for RTK data."]
13970    pub rtk_health: u8,
13971    #[doc = "Rate of baseline messages being received by GPS"]
13972    pub rtk_rate: u8,
13973    #[doc = "Current number of sats used for RTK calculation."]
13974    pub nsats: u8,
13975    #[doc = "Coordinate system of baseline"]
13976    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13977}
13978impl GPS2_RTK_DATA {
13979    pub const ENCODED_LEN: usize = 35usize;
13980    pub const DEFAULT: Self = Self {
13981        time_last_baseline_ms: 0_u32,
13982        tow: 0_u32,
13983        baseline_a_mm: 0_i32,
13984        baseline_b_mm: 0_i32,
13985        baseline_c_mm: 0_i32,
13986        accuracy: 0_u32,
13987        iar_num_hypotheses: 0_i32,
13988        wn: 0_u16,
13989        rtk_receiver_id: 0_u8,
13990        rtk_health: 0_u8,
13991        rtk_rate: 0_u8,
13992        nsats: 0_u8,
13993        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13994    };
13995    #[cfg(feature = "arbitrary")]
13996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13997        use arbitrary::{Arbitrary, Unstructured};
13998        let mut buf = [0u8; 1024];
13999        rng.fill_bytes(&mut buf);
14000        let mut unstructured = Unstructured::new(&buf);
14001        Self::arbitrary(&mut unstructured).unwrap_or_default()
14002    }
14003}
14004impl Default for GPS2_RTK_DATA {
14005    fn default() -> Self {
14006        Self::DEFAULT.clone()
14007    }
14008}
14009impl MessageData for GPS2_RTK_DATA {
14010    type Message = MavMessage;
14011    const ID: u32 = 128u32;
14012    const NAME: &'static str = "GPS2_RTK";
14013    const EXTRA_CRC: u8 = 226u8;
14014    const ENCODED_LEN: usize = 35usize;
14015    fn deser(
14016        _version: MavlinkVersion,
14017        __input: &[u8],
14018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14019        let avail_len = __input.len();
14020        let mut payload_buf = [0; Self::ENCODED_LEN];
14021        let mut buf = if avail_len < Self::ENCODED_LEN {
14022            payload_buf[0..avail_len].copy_from_slice(__input);
14023            Bytes::new(&payload_buf)
14024        } else {
14025            Bytes::new(__input)
14026        };
14027        let mut __struct = Self::default();
14028        __struct.time_last_baseline_ms = buf.get_u32_le();
14029        __struct.tow = buf.get_u32_le();
14030        __struct.baseline_a_mm = buf.get_i32_le();
14031        __struct.baseline_b_mm = buf.get_i32_le();
14032        __struct.baseline_c_mm = buf.get_i32_le();
14033        __struct.accuracy = buf.get_u32_le();
14034        __struct.iar_num_hypotheses = buf.get_i32_le();
14035        __struct.wn = buf.get_u16_le();
14036        __struct.rtk_receiver_id = buf.get_u8();
14037        __struct.rtk_health = buf.get_u8();
14038        __struct.rtk_rate = buf.get_u8();
14039        __struct.nsats = buf.get_u8();
14040        let tmp = buf.get_u8();
14041        __struct.baseline_coords_type =
14042            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14043                enum_type: "RtkBaselineCoordinateSystem",
14044                value: tmp as u32,
14045            })?;
14046        Ok(__struct)
14047    }
14048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14049        let mut __tmp = BytesMut::new(bytes);
14050        #[allow(clippy::absurd_extreme_comparisons)]
14051        #[allow(unused_comparisons)]
14052        if __tmp.remaining() < Self::ENCODED_LEN {
14053            panic!(
14054                "buffer is too small (need {} bytes, but got {})",
14055                Self::ENCODED_LEN,
14056                __tmp.remaining(),
14057            )
14058        }
14059        __tmp.put_u32_le(self.time_last_baseline_ms);
14060        __tmp.put_u32_le(self.tow);
14061        __tmp.put_i32_le(self.baseline_a_mm);
14062        __tmp.put_i32_le(self.baseline_b_mm);
14063        __tmp.put_i32_le(self.baseline_c_mm);
14064        __tmp.put_u32_le(self.accuracy);
14065        __tmp.put_i32_le(self.iar_num_hypotheses);
14066        __tmp.put_u16_le(self.wn);
14067        __tmp.put_u8(self.rtk_receiver_id);
14068        __tmp.put_u8(self.rtk_health);
14069        __tmp.put_u8(self.rtk_rate);
14070        __tmp.put_u8(self.nsats);
14071        __tmp.put_u8(self.baseline_coords_type as u8);
14072        if matches!(version, MavlinkVersion::V2) {
14073            let len = __tmp.len();
14074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14075        } else {
14076            __tmp.len()
14077        }
14078    }
14079}
14080#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14081#[doc = ""]
14082#[doc = "ID: 49"]
14083#[derive(Debug, Clone, PartialEq)]
14084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14086#[cfg_attr(feature = "ts", derive(TS))]
14087#[cfg_attr(feature = "ts", ts(export))]
14088pub struct GPS_GLOBAL_ORIGIN_DATA {
14089    #[doc = "Latitude (WGS84)"]
14090    pub latitude: i32,
14091    #[doc = "Longitude (WGS84)"]
14092    pub longitude: i32,
14093    #[doc = "Altitude (MSL). Positive for up."]
14094    pub altitude: i32,
14095    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14096    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14097    pub time_usec: u64,
14098}
14099impl GPS_GLOBAL_ORIGIN_DATA {
14100    pub const ENCODED_LEN: usize = 20usize;
14101    pub const DEFAULT: Self = Self {
14102        latitude: 0_i32,
14103        longitude: 0_i32,
14104        altitude: 0_i32,
14105        time_usec: 0_u64,
14106    };
14107    #[cfg(feature = "arbitrary")]
14108    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14109        use arbitrary::{Arbitrary, Unstructured};
14110        let mut buf = [0u8; 1024];
14111        rng.fill_bytes(&mut buf);
14112        let mut unstructured = Unstructured::new(&buf);
14113        Self::arbitrary(&mut unstructured).unwrap_or_default()
14114    }
14115}
14116impl Default for GPS_GLOBAL_ORIGIN_DATA {
14117    fn default() -> Self {
14118        Self::DEFAULT.clone()
14119    }
14120}
14121impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14122    type Message = MavMessage;
14123    const ID: u32 = 49u32;
14124    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14125    const EXTRA_CRC: u8 = 39u8;
14126    const ENCODED_LEN: usize = 20usize;
14127    fn deser(
14128        _version: MavlinkVersion,
14129        __input: &[u8],
14130    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14131        let avail_len = __input.len();
14132        let mut payload_buf = [0; Self::ENCODED_LEN];
14133        let mut buf = if avail_len < Self::ENCODED_LEN {
14134            payload_buf[0..avail_len].copy_from_slice(__input);
14135            Bytes::new(&payload_buf)
14136        } else {
14137            Bytes::new(__input)
14138        };
14139        let mut __struct = Self::default();
14140        __struct.latitude = buf.get_i32_le();
14141        __struct.longitude = buf.get_i32_le();
14142        __struct.altitude = buf.get_i32_le();
14143        __struct.time_usec = buf.get_u64_le();
14144        Ok(__struct)
14145    }
14146    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14147        let mut __tmp = BytesMut::new(bytes);
14148        #[allow(clippy::absurd_extreme_comparisons)]
14149        #[allow(unused_comparisons)]
14150        if __tmp.remaining() < Self::ENCODED_LEN {
14151            panic!(
14152                "buffer is too small (need {} bytes, but got {})",
14153                Self::ENCODED_LEN,
14154                __tmp.remaining(),
14155            )
14156        }
14157        __tmp.put_i32_le(self.latitude);
14158        __tmp.put_i32_le(self.longitude);
14159        __tmp.put_i32_le(self.altitude);
14160        if matches!(version, MavlinkVersion::V2) {
14161            __tmp.put_u64_le(self.time_usec);
14162            let len = __tmp.len();
14163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14164        } else {
14165            __tmp.len()
14166        }
14167    }
14168}
14169#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14170#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14171#[doc = ""]
14172#[doc = "ID: 123"]
14173#[derive(Debug, Clone, PartialEq)]
14174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14176#[cfg_attr(feature = "ts", derive(TS))]
14177#[cfg_attr(feature = "ts", ts(export))]
14178pub struct GPS_INJECT_DATA_DATA {
14179    #[doc = "System ID"]
14180    pub target_system: u8,
14181    #[doc = "Component ID"]
14182    pub target_component: u8,
14183    #[doc = "Data length"]
14184    pub len: u8,
14185    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14186    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14187    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14188    pub data: [u8; 110],
14189}
14190impl GPS_INJECT_DATA_DATA {
14191    pub const ENCODED_LEN: usize = 113usize;
14192    pub const DEFAULT: Self = Self {
14193        target_system: 0_u8,
14194        target_component: 0_u8,
14195        len: 0_u8,
14196        data: [0_u8; 110usize],
14197    };
14198    #[cfg(feature = "arbitrary")]
14199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14200        use arbitrary::{Arbitrary, Unstructured};
14201        let mut buf = [0u8; 1024];
14202        rng.fill_bytes(&mut buf);
14203        let mut unstructured = Unstructured::new(&buf);
14204        Self::arbitrary(&mut unstructured).unwrap_or_default()
14205    }
14206}
14207impl Default for GPS_INJECT_DATA_DATA {
14208    fn default() -> Self {
14209        Self::DEFAULT.clone()
14210    }
14211}
14212impl MessageData for GPS_INJECT_DATA_DATA {
14213    type Message = MavMessage;
14214    const ID: u32 = 123u32;
14215    const NAME: &'static str = "GPS_INJECT_DATA";
14216    const EXTRA_CRC: u8 = 250u8;
14217    const ENCODED_LEN: usize = 113usize;
14218    fn deser(
14219        _version: MavlinkVersion,
14220        __input: &[u8],
14221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14222        let avail_len = __input.len();
14223        let mut payload_buf = [0; Self::ENCODED_LEN];
14224        let mut buf = if avail_len < Self::ENCODED_LEN {
14225            payload_buf[0..avail_len].copy_from_slice(__input);
14226            Bytes::new(&payload_buf)
14227        } else {
14228            Bytes::new(__input)
14229        };
14230        let mut __struct = Self::default();
14231        __struct.target_system = buf.get_u8();
14232        __struct.target_component = buf.get_u8();
14233        __struct.len = buf.get_u8();
14234        for v in &mut __struct.data {
14235            let val = buf.get_u8();
14236            *v = val;
14237        }
14238        Ok(__struct)
14239    }
14240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14241        let mut __tmp = BytesMut::new(bytes);
14242        #[allow(clippy::absurd_extreme_comparisons)]
14243        #[allow(unused_comparisons)]
14244        if __tmp.remaining() < Self::ENCODED_LEN {
14245            panic!(
14246                "buffer is too small (need {} bytes, but got {})",
14247                Self::ENCODED_LEN,
14248                __tmp.remaining(),
14249            )
14250        }
14251        __tmp.put_u8(self.target_system);
14252        __tmp.put_u8(self.target_component);
14253        __tmp.put_u8(self.len);
14254        for val in &self.data {
14255            __tmp.put_u8(*val);
14256        }
14257        if matches!(version, MavlinkVersion::V2) {
14258            let len = __tmp.len();
14259            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14260        } else {
14261            __tmp.len()
14262        }
14263    }
14264}
14265#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14266#[doc = ""]
14267#[doc = "ID: 232"]
14268#[derive(Debug, Clone, PartialEq)]
14269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14271#[cfg_attr(feature = "ts", derive(TS))]
14272#[cfg_attr(feature = "ts", ts(export))]
14273pub struct GPS_INPUT_DATA {
14274    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14275    pub time_usec: u64,
14276    #[doc = "GPS time (from start of GPS week)"]
14277    pub time_week_ms: u32,
14278    #[doc = "Latitude (WGS84)"]
14279    pub lat: i32,
14280    #[doc = "Longitude (WGS84)"]
14281    pub lon: i32,
14282    #[doc = "Altitude (MSL). Positive for up."]
14283    pub alt: f32,
14284    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14285    pub hdop: f32,
14286    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14287    pub vdop: f32,
14288    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14289    pub vn: f32,
14290    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14291    pub ve: f32,
14292    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14293    pub vd: f32,
14294    #[doc = "GPS speed accuracy"]
14295    pub speed_accuracy: f32,
14296    #[doc = "GPS horizontal accuracy"]
14297    pub horiz_accuracy: f32,
14298    #[doc = "GPS vertical accuracy"]
14299    pub vert_accuracy: f32,
14300    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14301    pub ignore_flags: GpsInputIgnoreFlags,
14302    #[doc = "GPS week number"]
14303    pub time_week: u16,
14304    #[doc = "ID of the GPS for multiple GPS inputs"]
14305    pub gps_id: u8,
14306    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14307    pub fix_type: u8,
14308    #[doc = "Number of satellites visible."]
14309    pub satellites_visible: u8,
14310    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14311    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14312    pub yaw: u16,
14313}
14314impl GPS_INPUT_DATA {
14315    pub const ENCODED_LEN: usize = 65usize;
14316    pub const DEFAULT: Self = Self {
14317        time_usec: 0_u64,
14318        time_week_ms: 0_u32,
14319        lat: 0_i32,
14320        lon: 0_i32,
14321        alt: 0.0_f32,
14322        hdop: 0.0_f32,
14323        vdop: 0.0_f32,
14324        vn: 0.0_f32,
14325        ve: 0.0_f32,
14326        vd: 0.0_f32,
14327        speed_accuracy: 0.0_f32,
14328        horiz_accuracy: 0.0_f32,
14329        vert_accuracy: 0.0_f32,
14330        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14331        time_week: 0_u16,
14332        gps_id: 0_u8,
14333        fix_type: 0_u8,
14334        satellites_visible: 0_u8,
14335        yaw: 0_u16,
14336    };
14337    #[cfg(feature = "arbitrary")]
14338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14339        use arbitrary::{Arbitrary, Unstructured};
14340        let mut buf = [0u8; 1024];
14341        rng.fill_bytes(&mut buf);
14342        let mut unstructured = Unstructured::new(&buf);
14343        Self::arbitrary(&mut unstructured).unwrap_or_default()
14344    }
14345}
14346impl Default for GPS_INPUT_DATA {
14347    fn default() -> Self {
14348        Self::DEFAULT.clone()
14349    }
14350}
14351impl MessageData for GPS_INPUT_DATA {
14352    type Message = MavMessage;
14353    const ID: u32 = 232u32;
14354    const NAME: &'static str = "GPS_INPUT";
14355    const EXTRA_CRC: u8 = 151u8;
14356    const ENCODED_LEN: usize = 65usize;
14357    fn deser(
14358        _version: MavlinkVersion,
14359        __input: &[u8],
14360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14361        let avail_len = __input.len();
14362        let mut payload_buf = [0; Self::ENCODED_LEN];
14363        let mut buf = if avail_len < Self::ENCODED_LEN {
14364            payload_buf[0..avail_len].copy_from_slice(__input);
14365            Bytes::new(&payload_buf)
14366        } else {
14367            Bytes::new(__input)
14368        };
14369        let mut __struct = Self::default();
14370        __struct.time_usec = buf.get_u64_le();
14371        __struct.time_week_ms = buf.get_u32_le();
14372        __struct.lat = buf.get_i32_le();
14373        __struct.lon = buf.get_i32_le();
14374        __struct.alt = buf.get_f32_le();
14375        __struct.hdop = buf.get_f32_le();
14376        __struct.vdop = buf.get_f32_le();
14377        __struct.vn = buf.get_f32_le();
14378        __struct.ve = buf.get_f32_le();
14379        __struct.vd = buf.get_f32_le();
14380        __struct.speed_accuracy = buf.get_f32_le();
14381        __struct.horiz_accuracy = buf.get_f32_le();
14382        __struct.vert_accuracy = buf.get_f32_le();
14383        let tmp = buf.get_u16_le();
14384        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14385            tmp & GpsInputIgnoreFlags::all().bits(),
14386        )
14387        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14388            flag_type: "GpsInputIgnoreFlags",
14389            value: tmp as u32,
14390        })?;
14391        __struct.time_week = buf.get_u16_le();
14392        __struct.gps_id = buf.get_u8();
14393        __struct.fix_type = buf.get_u8();
14394        __struct.satellites_visible = buf.get_u8();
14395        __struct.yaw = buf.get_u16_le();
14396        Ok(__struct)
14397    }
14398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14399        let mut __tmp = BytesMut::new(bytes);
14400        #[allow(clippy::absurd_extreme_comparisons)]
14401        #[allow(unused_comparisons)]
14402        if __tmp.remaining() < Self::ENCODED_LEN {
14403            panic!(
14404                "buffer is too small (need {} bytes, but got {})",
14405                Self::ENCODED_LEN,
14406                __tmp.remaining(),
14407            )
14408        }
14409        __tmp.put_u64_le(self.time_usec);
14410        __tmp.put_u32_le(self.time_week_ms);
14411        __tmp.put_i32_le(self.lat);
14412        __tmp.put_i32_le(self.lon);
14413        __tmp.put_f32_le(self.alt);
14414        __tmp.put_f32_le(self.hdop);
14415        __tmp.put_f32_le(self.vdop);
14416        __tmp.put_f32_le(self.vn);
14417        __tmp.put_f32_le(self.ve);
14418        __tmp.put_f32_le(self.vd);
14419        __tmp.put_f32_le(self.speed_accuracy);
14420        __tmp.put_f32_le(self.horiz_accuracy);
14421        __tmp.put_f32_le(self.vert_accuracy);
14422        __tmp.put_u16_le(self.ignore_flags.bits());
14423        __tmp.put_u16_le(self.time_week);
14424        __tmp.put_u8(self.gps_id);
14425        __tmp.put_u8(self.fix_type);
14426        __tmp.put_u8(self.satellites_visible);
14427        if matches!(version, MavlinkVersion::V2) {
14428            __tmp.put_u16_le(self.yaw);
14429            let len = __tmp.len();
14430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14431        } else {
14432            __tmp.len()
14433        }
14434    }
14435}
14436#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14437#[doc = ""]
14438#[doc = "ID: 24"]
14439#[derive(Debug, Clone, PartialEq)]
14440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14442#[cfg_attr(feature = "ts", derive(TS))]
14443#[cfg_attr(feature = "ts", ts(export))]
14444pub struct GPS_RAW_INT_DATA {
14445    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14446    pub time_usec: u64,
14447    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14448    pub lat: i32,
14449    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14450    pub lon: i32,
14451    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14452    pub alt: i32,
14453    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14454    pub eph: u16,
14455    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14456    pub epv: u16,
14457    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14458    pub vel: u16,
14459    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14460    pub cog: u16,
14461    #[doc = "GPS fix type."]
14462    pub fix_type: GpsFixType,
14463    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14464    pub satellites_visible: u8,
14465    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14466    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14467    pub alt_ellipsoid: i32,
14468    #[doc = "Position uncertainty."]
14469    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14470    pub h_acc: u32,
14471    #[doc = "Altitude uncertainty."]
14472    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14473    pub v_acc: u32,
14474    #[doc = "Speed uncertainty."]
14475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14476    pub vel_acc: u32,
14477    #[doc = "Heading / track uncertainty"]
14478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14479    pub hdg_acc: u32,
14480    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14482    pub yaw: u16,
14483}
14484impl GPS_RAW_INT_DATA {
14485    pub const ENCODED_LEN: usize = 52usize;
14486    pub const DEFAULT: Self = Self {
14487        time_usec: 0_u64,
14488        lat: 0_i32,
14489        lon: 0_i32,
14490        alt: 0_i32,
14491        eph: 0_u16,
14492        epv: 0_u16,
14493        vel: 0_u16,
14494        cog: 0_u16,
14495        fix_type: GpsFixType::DEFAULT,
14496        satellites_visible: 0_u8,
14497        alt_ellipsoid: 0_i32,
14498        h_acc: 0_u32,
14499        v_acc: 0_u32,
14500        vel_acc: 0_u32,
14501        hdg_acc: 0_u32,
14502        yaw: 0_u16,
14503    };
14504    #[cfg(feature = "arbitrary")]
14505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14506        use arbitrary::{Arbitrary, Unstructured};
14507        let mut buf = [0u8; 1024];
14508        rng.fill_bytes(&mut buf);
14509        let mut unstructured = Unstructured::new(&buf);
14510        Self::arbitrary(&mut unstructured).unwrap_or_default()
14511    }
14512}
14513impl Default for GPS_RAW_INT_DATA {
14514    fn default() -> Self {
14515        Self::DEFAULT.clone()
14516    }
14517}
14518impl MessageData for GPS_RAW_INT_DATA {
14519    type Message = MavMessage;
14520    const ID: u32 = 24u32;
14521    const NAME: &'static str = "GPS_RAW_INT";
14522    const EXTRA_CRC: u8 = 24u8;
14523    const ENCODED_LEN: usize = 52usize;
14524    fn deser(
14525        _version: MavlinkVersion,
14526        __input: &[u8],
14527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14528        let avail_len = __input.len();
14529        let mut payload_buf = [0; Self::ENCODED_LEN];
14530        let mut buf = if avail_len < Self::ENCODED_LEN {
14531            payload_buf[0..avail_len].copy_from_slice(__input);
14532            Bytes::new(&payload_buf)
14533        } else {
14534            Bytes::new(__input)
14535        };
14536        let mut __struct = Self::default();
14537        __struct.time_usec = buf.get_u64_le();
14538        __struct.lat = buf.get_i32_le();
14539        __struct.lon = buf.get_i32_le();
14540        __struct.alt = buf.get_i32_le();
14541        __struct.eph = buf.get_u16_le();
14542        __struct.epv = buf.get_u16_le();
14543        __struct.vel = buf.get_u16_le();
14544        __struct.cog = buf.get_u16_le();
14545        let tmp = buf.get_u8();
14546        __struct.fix_type =
14547            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14548                enum_type: "GpsFixType",
14549                value: tmp as u32,
14550            })?;
14551        __struct.satellites_visible = buf.get_u8();
14552        __struct.alt_ellipsoid = buf.get_i32_le();
14553        __struct.h_acc = buf.get_u32_le();
14554        __struct.v_acc = buf.get_u32_le();
14555        __struct.vel_acc = buf.get_u32_le();
14556        __struct.hdg_acc = buf.get_u32_le();
14557        __struct.yaw = buf.get_u16_le();
14558        Ok(__struct)
14559    }
14560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14561        let mut __tmp = BytesMut::new(bytes);
14562        #[allow(clippy::absurd_extreme_comparisons)]
14563        #[allow(unused_comparisons)]
14564        if __tmp.remaining() < Self::ENCODED_LEN {
14565            panic!(
14566                "buffer is too small (need {} bytes, but got {})",
14567                Self::ENCODED_LEN,
14568                __tmp.remaining(),
14569            )
14570        }
14571        __tmp.put_u64_le(self.time_usec);
14572        __tmp.put_i32_le(self.lat);
14573        __tmp.put_i32_le(self.lon);
14574        __tmp.put_i32_le(self.alt);
14575        __tmp.put_u16_le(self.eph);
14576        __tmp.put_u16_le(self.epv);
14577        __tmp.put_u16_le(self.vel);
14578        __tmp.put_u16_le(self.cog);
14579        __tmp.put_u8(self.fix_type as u8);
14580        __tmp.put_u8(self.satellites_visible);
14581        if matches!(version, MavlinkVersion::V2) {
14582            __tmp.put_i32_le(self.alt_ellipsoid);
14583            __tmp.put_u32_le(self.h_acc);
14584            __tmp.put_u32_le(self.v_acc);
14585            __tmp.put_u32_le(self.vel_acc);
14586            __tmp.put_u32_le(self.hdg_acc);
14587            __tmp.put_u16_le(self.yaw);
14588            let len = __tmp.len();
14589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14590        } else {
14591            __tmp.len()
14592        }
14593    }
14594}
14595#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14596#[doc = ""]
14597#[doc = "ID: 233"]
14598#[derive(Debug, Clone, PartialEq)]
14599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14601#[cfg_attr(feature = "ts", derive(TS))]
14602#[cfg_attr(feature = "ts", ts(export))]
14603pub struct GPS_RTCM_DATA_DATA {
14604    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14605    pub flags: u8,
14606    #[doc = "data length"]
14607    pub len: u8,
14608    #[doc = "RTCM message (may be fragmented)"]
14609    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14610    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14611    pub data: [u8; 180],
14612}
14613impl GPS_RTCM_DATA_DATA {
14614    pub const ENCODED_LEN: usize = 182usize;
14615    pub const DEFAULT: Self = Self {
14616        flags: 0_u8,
14617        len: 0_u8,
14618        data: [0_u8; 180usize],
14619    };
14620    #[cfg(feature = "arbitrary")]
14621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14622        use arbitrary::{Arbitrary, Unstructured};
14623        let mut buf = [0u8; 1024];
14624        rng.fill_bytes(&mut buf);
14625        let mut unstructured = Unstructured::new(&buf);
14626        Self::arbitrary(&mut unstructured).unwrap_or_default()
14627    }
14628}
14629impl Default for GPS_RTCM_DATA_DATA {
14630    fn default() -> Self {
14631        Self::DEFAULT.clone()
14632    }
14633}
14634impl MessageData for GPS_RTCM_DATA_DATA {
14635    type Message = MavMessage;
14636    const ID: u32 = 233u32;
14637    const NAME: &'static str = "GPS_RTCM_DATA";
14638    const EXTRA_CRC: u8 = 35u8;
14639    const ENCODED_LEN: usize = 182usize;
14640    fn deser(
14641        _version: MavlinkVersion,
14642        __input: &[u8],
14643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14644        let avail_len = __input.len();
14645        let mut payload_buf = [0; Self::ENCODED_LEN];
14646        let mut buf = if avail_len < Self::ENCODED_LEN {
14647            payload_buf[0..avail_len].copy_from_slice(__input);
14648            Bytes::new(&payload_buf)
14649        } else {
14650            Bytes::new(__input)
14651        };
14652        let mut __struct = Self::default();
14653        __struct.flags = buf.get_u8();
14654        __struct.len = buf.get_u8();
14655        for v in &mut __struct.data {
14656            let val = buf.get_u8();
14657            *v = val;
14658        }
14659        Ok(__struct)
14660    }
14661    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14662        let mut __tmp = BytesMut::new(bytes);
14663        #[allow(clippy::absurd_extreme_comparisons)]
14664        #[allow(unused_comparisons)]
14665        if __tmp.remaining() < Self::ENCODED_LEN {
14666            panic!(
14667                "buffer is too small (need {} bytes, but got {})",
14668                Self::ENCODED_LEN,
14669                __tmp.remaining(),
14670            )
14671        }
14672        __tmp.put_u8(self.flags);
14673        __tmp.put_u8(self.len);
14674        for val in &self.data {
14675            __tmp.put_u8(*val);
14676        }
14677        if matches!(version, MavlinkVersion::V2) {
14678            let len = __tmp.len();
14679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14680        } else {
14681            __tmp.len()
14682        }
14683    }
14684}
14685#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14686#[doc = ""]
14687#[doc = "ID: 127"]
14688#[derive(Debug, Clone, PartialEq)]
14689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14691#[cfg_attr(feature = "ts", derive(TS))]
14692#[cfg_attr(feature = "ts", ts(export))]
14693pub struct GPS_RTK_DATA {
14694    #[doc = "Time since boot of last baseline message received."]
14695    pub time_last_baseline_ms: u32,
14696    #[doc = "GPS Time of Week of last baseline"]
14697    pub tow: u32,
14698    #[doc = "Current baseline in ECEF x or NED north component."]
14699    pub baseline_a_mm: i32,
14700    #[doc = "Current baseline in ECEF y or NED east component."]
14701    pub baseline_b_mm: i32,
14702    #[doc = "Current baseline in ECEF z or NED down component."]
14703    pub baseline_c_mm: i32,
14704    #[doc = "Current estimate of baseline accuracy."]
14705    pub accuracy: u32,
14706    #[doc = "Current number of integer ambiguity hypotheses."]
14707    pub iar_num_hypotheses: i32,
14708    #[doc = "GPS Week Number of last baseline"]
14709    pub wn: u16,
14710    #[doc = "Identification of connected RTK receiver."]
14711    pub rtk_receiver_id: u8,
14712    #[doc = "GPS-specific health report for RTK data."]
14713    pub rtk_health: u8,
14714    #[doc = "Rate of baseline messages being received by GPS"]
14715    pub rtk_rate: u8,
14716    #[doc = "Current number of sats used for RTK calculation."]
14717    pub nsats: u8,
14718    #[doc = "Coordinate system of baseline"]
14719    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14720}
14721impl GPS_RTK_DATA {
14722    pub const ENCODED_LEN: usize = 35usize;
14723    pub const DEFAULT: Self = Self {
14724        time_last_baseline_ms: 0_u32,
14725        tow: 0_u32,
14726        baseline_a_mm: 0_i32,
14727        baseline_b_mm: 0_i32,
14728        baseline_c_mm: 0_i32,
14729        accuracy: 0_u32,
14730        iar_num_hypotheses: 0_i32,
14731        wn: 0_u16,
14732        rtk_receiver_id: 0_u8,
14733        rtk_health: 0_u8,
14734        rtk_rate: 0_u8,
14735        nsats: 0_u8,
14736        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14737    };
14738    #[cfg(feature = "arbitrary")]
14739    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14740        use arbitrary::{Arbitrary, Unstructured};
14741        let mut buf = [0u8; 1024];
14742        rng.fill_bytes(&mut buf);
14743        let mut unstructured = Unstructured::new(&buf);
14744        Self::arbitrary(&mut unstructured).unwrap_or_default()
14745    }
14746}
14747impl Default for GPS_RTK_DATA {
14748    fn default() -> Self {
14749        Self::DEFAULT.clone()
14750    }
14751}
14752impl MessageData for GPS_RTK_DATA {
14753    type Message = MavMessage;
14754    const ID: u32 = 127u32;
14755    const NAME: &'static str = "GPS_RTK";
14756    const EXTRA_CRC: u8 = 25u8;
14757    const ENCODED_LEN: usize = 35usize;
14758    fn deser(
14759        _version: MavlinkVersion,
14760        __input: &[u8],
14761    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14762        let avail_len = __input.len();
14763        let mut payload_buf = [0; Self::ENCODED_LEN];
14764        let mut buf = if avail_len < Self::ENCODED_LEN {
14765            payload_buf[0..avail_len].copy_from_slice(__input);
14766            Bytes::new(&payload_buf)
14767        } else {
14768            Bytes::new(__input)
14769        };
14770        let mut __struct = Self::default();
14771        __struct.time_last_baseline_ms = buf.get_u32_le();
14772        __struct.tow = buf.get_u32_le();
14773        __struct.baseline_a_mm = buf.get_i32_le();
14774        __struct.baseline_b_mm = buf.get_i32_le();
14775        __struct.baseline_c_mm = buf.get_i32_le();
14776        __struct.accuracy = buf.get_u32_le();
14777        __struct.iar_num_hypotheses = buf.get_i32_le();
14778        __struct.wn = buf.get_u16_le();
14779        __struct.rtk_receiver_id = buf.get_u8();
14780        __struct.rtk_health = buf.get_u8();
14781        __struct.rtk_rate = buf.get_u8();
14782        __struct.nsats = buf.get_u8();
14783        let tmp = buf.get_u8();
14784        __struct.baseline_coords_type =
14785            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14786                enum_type: "RtkBaselineCoordinateSystem",
14787                value: tmp as u32,
14788            })?;
14789        Ok(__struct)
14790    }
14791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14792        let mut __tmp = BytesMut::new(bytes);
14793        #[allow(clippy::absurd_extreme_comparisons)]
14794        #[allow(unused_comparisons)]
14795        if __tmp.remaining() < Self::ENCODED_LEN {
14796            panic!(
14797                "buffer is too small (need {} bytes, but got {})",
14798                Self::ENCODED_LEN,
14799                __tmp.remaining(),
14800            )
14801        }
14802        __tmp.put_u32_le(self.time_last_baseline_ms);
14803        __tmp.put_u32_le(self.tow);
14804        __tmp.put_i32_le(self.baseline_a_mm);
14805        __tmp.put_i32_le(self.baseline_b_mm);
14806        __tmp.put_i32_le(self.baseline_c_mm);
14807        __tmp.put_u32_le(self.accuracy);
14808        __tmp.put_i32_le(self.iar_num_hypotheses);
14809        __tmp.put_u16_le(self.wn);
14810        __tmp.put_u8(self.rtk_receiver_id);
14811        __tmp.put_u8(self.rtk_health);
14812        __tmp.put_u8(self.rtk_rate);
14813        __tmp.put_u8(self.nsats);
14814        __tmp.put_u8(self.baseline_coords_type as u8);
14815        if matches!(version, MavlinkVersion::V2) {
14816            let len = __tmp.len();
14817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14818        } else {
14819            __tmp.len()
14820        }
14821    }
14822}
14823#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14824#[doc = ""]
14825#[doc = "ID: 25"]
14826#[derive(Debug, Clone, PartialEq)]
14827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14829#[cfg_attr(feature = "ts", derive(TS))]
14830#[cfg_attr(feature = "ts", ts(export))]
14831pub struct GPS_STATUS_DATA {
14832    #[doc = "Number of satellites visible"]
14833    pub satellites_visible: u8,
14834    #[doc = "Global satellite ID"]
14835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14836    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14837    pub satellite_prn: [u8; 20],
14838    #[doc = "0: Satellite not used, 1: used for localization"]
14839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14840    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14841    pub satellite_used: [u8; 20],
14842    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14844    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14845    pub satellite_elevation: [u8; 20],
14846    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14848    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14849    pub satellite_azimuth: [u8; 20],
14850    #[doc = "Signal to noise ratio of satellite"]
14851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14852    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14853    pub satellite_snr: [u8; 20],
14854}
14855impl GPS_STATUS_DATA {
14856    pub const ENCODED_LEN: usize = 101usize;
14857    pub const DEFAULT: Self = Self {
14858        satellites_visible: 0_u8,
14859        satellite_prn: [0_u8; 20usize],
14860        satellite_used: [0_u8; 20usize],
14861        satellite_elevation: [0_u8; 20usize],
14862        satellite_azimuth: [0_u8; 20usize],
14863        satellite_snr: [0_u8; 20usize],
14864    };
14865    #[cfg(feature = "arbitrary")]
14866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14867        use arbitrary::{Arbitrary, Unstructured};
14868        let mut buf = [0u8; 1024];
14869        rng.fill_bytes(&mut buf);
14870        let mut unstructured = Unstructured::new(&buf);
14871        Self::arbitrary(&mut unstructured).unwrap_or_default()
14872    }
14873}
14874impl Default for GPS_STATUS_DATA {
14875    fn default() -> Self {
14876        Self::DEFAULT.clone()
14877    }
14878}
14879impl MessageData for GPS_STATUS_DATA {
14880    type Message = MavMessage;
14881    const ID: u32 = 25u32;
14882    const NAME: &'static str = "GPS_STATUS";
14883    const EXTRA_CRC: u8 = 23u8;
14884    const ENCODED_LEN: usize = 101usize;
14885    fn deser(
14886        _version: MavlinkVersion,
14887        __input: &[u8],
14888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14889        let avail_len = __input.len();
14890        let mut payload_buf = [0; Self::ENCODED_LEN];
14891        let mut buf = if avail_len < Self::ENCODED_LEN {
14892            payload_buf[0..avail_len].copy_from_slice(__input);
14893            Bytes::new(&payload_buf)
14894        } else {
14895            Bytes::new(__input)
14896        };
14897        let mut __struct = Self::default();
14898        __struct.satellites_visible = buf.get_u8();
14899        for v in &mut __struct.satellite_prn {
14900            let val = buf.get_u8();
14901            *v = val;
14902        }
14903        for v in &mut __struct.satellite_used {
14904            let val = buf.get_u8();
14905            *v = val;
14906        }
14907        for v in &mut __struct.satellite_elevation {
14908            let val = buf.get_u8();
14909            *v = val;
14910        }
14911        for v in &mut __struct.satellite_azimuth {
14912            let val = buf.get_u8();
14913            *v = val;
14914        }
14915        for v in &mut __struct.satellite_snr {
14916            let val = buf.get_u8();
14917            *v = val;
14918        }
14919        Ok(__struct)
14920    }
14921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14922        let mut __tmp = BytesMut::new(bytes);
14923        #[allow(clippy::absurd_extreme_comparisons)]
14924        #[allow(unused_comparisons)]
14925        if __tmp.remaining() < Self::ENCODED_LEN {
14926            panic!(
14927                "buffer is too small (need {} bytes, but got {})",
14928                Self::ENCODED_LEN,
14929                __tmp.remaining(),
14930            )
14931        }
14932        __tmp.put_u8(self.satellites_visible);
14933        for val in &self.satellite_prn {
14934            __tmp.put_u8(*val);
14935        }
14936        for val in &self.satellite_used {
14937            __tmp.put_u8(*val);
14938        }
14939        for val in &self.satellite_elevation {
14940            __tmp.put_u8(*val);
14941        }
14942        for val in &self.satellite_azimuth {
14943            __tmp.put_u8(*val);
14944        }
14945        for val in &self.satellite_snr {
14946            __tmp.put_u8(*val);
14947        }
14948        if matches!(version, MavlinkVersion::V2) {
14949            let len = __tmp.len();
14950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14951        } else {
14952            __tmp.len()
14953        }
14954    }
14955}
14956#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14957#[doc = ""]
14958#[doc = "ID: 0"]
14959#[derive(Debug, Clone, PartialEq)]
14960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14962#[cfg_attr(feature = "ts", derive(TS))]
14963#[cfg_attr(feature = "ts", ts(export))]
14964pub struct HEARTBEAT_DATA {
14965    #[doc = "A bitfield for use for autopilot-specific flags"]
14966    pub custom_mode: u32,
14967    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14968    pub mavtype: MavType,
14969    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14970    pub autopilot: MavAutopilot,
14971    #[doc = "System mode bitmap."]
14972    pub base_mode: MavModeFlag,
14973    #[doc = "System status flag."]
14974    pub system_status: MavState,
14975    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14976    pub mavlink_version: u8,
14977}
14978impl HEARTBEAT_DATA {
14979    pub const ENCODED_LEN: usize = 9usize;
14980    pub const DEFAULT: Self = Self {
14981        custom_mode: 0_u32,
14982        mavtype: MavType::DEFAULT,
14983        autopilot: MavAutopilot::DEFAULT,
14984        base_mode: MavModeFlag::DEFAULT,
14985        system_status: MavState::DEFAULT,
14986        mavlink_version: MINOR_MAVLINK_VERSION,
14987    };
14988    #[cfg(feature = "arbitrary")]
14989    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14990        use arbitrary::{Arbitrary, Unstructured};
14991        let mut buf = [0u8; 1024];
14992        rng.fill_bytes(&mut buf);
14993        let mut unstructured = Unstructured::new(&buf);
14994        Self::arbitrary(&mut unstructured).unwrap_or_default()
14995    }
14996}
14997impl Default for HEARTBEAT_DATA {
14998    fn default() -> Self {
14999        Self::DEFAULT.clone()
15000    }
15001}
15002impl MessageData for HEARTBEAT_DATA {
15003    type Message = MavMessage;
15004    const ID: u32 = 0u32;
15005    const NAME: &'static str = "HEARTBEAT";
15006    const EXTRA_CRC: u8 = 50u8;
15007    const ENCODED_LEN: usize = 9usize;
15008    fn deser(
15009        _version: MavlinkVersion,
15010        __input: &[u8],
15011    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15012        let avail_len = __input.len();
15013        let mut payload_buf = [0; Self::ENCODED_LEN];
15014        let mut buf = if avail_len < Self::ENCODED_LEN {
15015            payload_buf[0..avail_len].copy_from_slice(__input);
15016            Bytes::new(&payload_buf)
15017        } else {
15018            Bytes::new(__input)
15019        };
15020        let mut __struct = Self::default();
15021        __struct.custom_mode = buf.get_u32_le();
15022        let tmp = buf.get_u8();
15023        __struct.mavtype =
15024            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15025                enum_type: "MavType",
15026                value: tmp as u32,
15027            })?;
15028        let tmp = buf.get_u8();
15029        __struct.autopilot =
15030            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15031                enum_type: "MavAutopilot",
15032                value: tmp as u32,
15033            })?;
15034        let tmp = buf.get_u8();
15035        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15036            ::mavlink_core::error::ParserError::InvalidFlag {
15037                flag_type: "MavModeFlag",
15038                value: tmp as u32,
15039            },
15040        )?;
15041        let tmp = buf.get_u8();
15042        __struct.system_status =
15043            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15044                enum_type: "MavState",
15045                value: tmp as u32,
15046            })?;
15047        __struct.mavlink_version = buf.get_u8();
15048        Ok(__struct)
15049    }
15050    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15051        let mut __tmp = BytesMut::new(bytes);
15052        #[allow(clippy::absurd_extreme_comparisons)]
15053        #[allow(unused_comparisons)]
15054        if __tmp.remaining() < Self::ENCODED_LEN {
15055            panic!(
15056                "buffer is too small (need {} bytes, but got {})",
15057                Self::ENCODED_LEN,
15058                __tmp.remaining(),
15059            )
15060        }
15061        __tmp.put_u32_le(self.custom_mode);
15062        __tmp.put_u8(self.mavtype as u8);
15063        __tmp.put_u8(self.autopilot as u8);
15064        __tmp.put_u8(self.base_mode.bits());
15065        __tmp.put_u8(self.system_status as u8);
15066        __tmp.put_u8(self.mavlink_version);
15067        if matches!(version, MavlinkVersion::V2) {
15068            let len = __tmp.len();
15069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15070        } else {
15071            __tmp.len()
15072        }
15073    }
15074}
15075#[doc = "The IMU readings in SI units in NED body frame."]
15076#[doc = ""]
15077#[doc = "ID: 105"]
15078#[derive(Debug, Clone, PartialEq)]
15079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15081#[cfg_attr(feature = "ts", derive(TS))]
15082#[cfg_attr(feature = "ts", ts(export))]
15083pub struct HIGHRES_IMU_DATA {
15084    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15085    pub time_usec: u64,
15086    #[doc = "X acceleration"]
15087    pub xacc: f32,
15088    #[doc = "Y acceleration"]
15089    pub yacc: f32,
15090    #[doc = "Z acceleration"]
15091    pub zacc: f32,
15092    #[doc = "Angular speed around X axis"]
15093    pub xgyro: f32,
15094    #[doc = "Angular speed around Y axis"]
15095    pub ygyro: f32,
15096    #[doc = "Angular speed around Z axis"]
15097    pub zgyro: f32,
15098    #[doc = "X Magnetic field"]
15099    pub xmag: f32,
15100    #[doc = "Y Magnetic field"]
15101    pub ymag: f32,
15102    #[doc = "Z Magnetic field"]
15103    pub zmag: f32,
15104    #[doc = "Absolute pressure"]
15105    pub abs_pressure: f32,
15106    #[doc = "Differential pressure"]
15107    pub diff_pressure: f32,
15108    #[doc = "Altitude calculated from pressure"]
15109    pub pressure_alt: f32,
15110    #[doc = "Temperature"]
15111    pub temperature: f32,
15112    #[doc = "Bitmap for fields that have updated since last message"]
15113    pub fields_updated: HighresImuUpdatedFlags,
15114    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15115    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15116    pub id: u8,
15117}
15118impl HIGHRES_IMU_DATA {
15119    pub const ENCODED_LEN: usize = 63usize;
15120    pub const DEFAULT: Self = Self {
15121        time_usec: 0_u64,
15122        xacc: 0.0_f32,
15123        yacc: 0.0_f32,
15124        zacc: 0.0_f32,
15125        xgyro: 0.0_f32,
15126        ygyro: 0.0_f32,
15127        zgyro: 0.0_f32,
15128        xmag: 0.0_f32,
15129        ymag: 0.0_f32,
15130        zmag: 0.0_f32,
15131        abs_pressure: 0.0_f32,
15132        diff_pressure: 0.0_f32,
15133        pressure_alt: 0.0_f32,
15134        temperature: 0.0_f32,
15135        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15136        id: 0_u8,
15137    };
15138    #[cfg(feature = "arbitrary")]
15139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15140        use arbitrary::{Arbitrary, Unstructured};
15141        let mut buf = [0u8; 1024];
15142        rng.fill_bytes(&mut buf);
15143        let mut unstructured = Unstructured::new(&buf);
15144        Self::arbitrary(&mut unstructured).unwrap_or_default()
15145    }
15146}
15147impl Default for HIGHRES_IMU_DATA {
15148    fn default() -> Self {
15149        Self::DEFAULT.clone()
15150    }
15151}
15152impl MessageData for HIGHRES_IMU_DATA {
15153    type Message = MavMessage;
15154    const ID: u32 = 105u32;
15155    const NAME: &'static str = "HIGHRES_IMU";
15156    const EXTRA_CRC: u8 = 93u8;
15157    const ENCODED_LEN: usize = 63usize;
15158    fn deser(
15159        _version: MavlinkVersion,
15160        __input: &[u8],
15161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15162        let avail_len = __input.len();
15163        let mut payload_buf = [0; Self::ENCODED_LEN];
15164        let mut buf = if avail_len < Self::ENCODED_LEN {
15165            payload_buf[0..avail_len].copy_from_slice(__input);
15166            Bytes::new(&payload_buf)
15167        } else {
15168            Bytes::new(__input)
15169        };
15170        let mut __struct = Self::default();
15171        __struct.time_usec = buf.get_u64_le();
15172        __struct.xacc = buf.get_f32_le();
15173        __struct.yacc = buf.get_f32_le();
15174        __struct.zacc = buf.get_f32_le();
15175        __struct.xgyro = buf.get_f32_le();
15176        __struct.ygyro = buf.get_f32_le();
15177        __struct.zgyro = buf.get_f32_le();
15178        __struct.xmag = buf.get_f32_le();
15179        __struct.ymag = buf.get_f32_le();
15180        __struct.zmag = buf.get_f32_le();
15181        __struct.abs_pressure = buf.get_f32_le();
15182        __struct.diff_pressure = buf.get_f32_le();
15183        __struct.pressure_alt = buf.get_f32_le();
15184        __struct.temperature = buf.get_f32_le();
15185        let tmp = buf.get_u16_le();
15186        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15187            tmp & HighresImuUpdatedFlags::all().bits(),
15188        )
15189        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15190            flag_type: "HighresImuUpdatedFlags",
15191            value: tmp as u32,
15192        })?;
15193        __struct.id = buf.get_u8();
15194        Ok(__struct)
15195    }
15196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15197        let mut __tmp = BytesMut::new(bytes);
15198        #[allow(clippy::absurd_extreme_comparisons)]
15199        #[allow(unused_comparisons)]
15200        if __tmp.remaining() < Self::ENCODED_LEN {
15201            panic!(
15202                "buffer is too small (need {} bytes, but got {})",
15203                Self::ENCODED_LEN,
15204                __tmp.remaining(),
15205            )
15206        }
15207        __tmp.put_u64_le(self.time_usec);
15208        __tmp.put_f32_le(self.xacc);
15209        __tmp.put_f32_le(self.yacc);
15210        __tmp.put_f32_le(self.zacc);
15211        __tmp.put_f32_le(self.xgyro);
15212        __tmp.put_f32_le(self.ygyro);
15213        __tmp.put_f32_le(self.zgyro);
15214        __tmp.put_f32_le(self.xmag);
15215        __tmp.put_f32_le(self.ymag);
15216        __tmp.put_f32_le(self.zmag);
15217        __tmp.put_f32_le(self.abs_pressure);
15218        __tmp.put_f32_le(self.diff_pressure);
15219        __tmp.put_f32_le(self.pressure_alt);
15220        __tmp.put_f32_le(self.temperature);
15221        __tmp.put_u16_le(self.fields_updated.bits());
15222        if matches!(version, MavlinkVersion::V2) {
15223            __tmp.put_u8(self.id);
15224            let len = __tmp.len();
15225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15226        } else {
15227            __tmp.len()
15228        }
15229    }
15230}
15231#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15232#[doc = "Message appropriate for high latency connections like Iridium."]
15233#[doc = ""]
15234#[doc = "ID: 234"]
15235#[derive(Debug, Clone, PartialEq)]
15236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15238#[cfg_attr(feature = "ts", derive(TS))]
15239#[cfg_attr(feature = "ts", ts(export))]
15240pub struct HIGH_LATENCY_DATA {
15241    #[doc = "A bitfield for use for autopilot-specific flags."]
15242    pub custom_mode: u32,
15243    #[doc = "Latitude"]
15244    pub latitude: i32,
15245    #[doc = "Longitude"]
15246    pub longitude: i32,
15247    #[doc = "roll"]
15248    pub roll: i16,
15249    #[doc = "pitch"]
15250    pub pitch: i16,
15251    #[doc = "heading"]
15252    pub heading: u16,
15253    #[doc = "heading setpoint"]
15254    pub heading_sp: i16,
15255    #[doc = "Altitude above mean sea level"]
15256    pub altitude_amsl: i16,
15257    #[doc = "Altitude setpoint relative to the home position"]
15258    pub altitude_sp: i16,
15259    #[doc = "distance to target"]
15260    pub wp_distance: u16,
15261    #[doc = "Bitmap of enabled system modes."]
15262    pub base_mode: MavModeFlag,
15263    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15264    pub landed_state: MavLandedState,
15265    #[doc = "throttle (percentage)"]
15266    pub throttle: i8,
15267    #[doc = "airspeed"]
15268    pub airspeed: u8,
15269    #[doc = "airspeed setpoint"]
15270    pub airspeed_sp: u8,
15271    #[doc = "groundspeed"]
15272    pub groundspeed: u8,
15273    #[doc = "climb rate"]
15274    pub climb_rate: i8,
15275    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15276    pub gps_nsat: u8,
15277    #[doc = "GPS Fix type."]
15278    pub gps_fix_type: GpsFixType,
15279    #[doc = "Remaining battery (percentage)"]
15280    pub battery_remaining: u8,
15281    #[doc = "Autopilot temperature (degrees C)"]
15282    pub temperature: i8,
15283    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15284    pub temperature_air: i8,
15285    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15286    pub failsafe: u8,
15287    #[doc = "current waypoint number"]
15288    pub wp_num: u8,
15289}
15290impl HIGH_LATENCY_DATA {
15291    pub const ENCODED_LEN: usize = 40usize;
15292    pub const DEFAULT: Self = Self {
15293        custom_mode: 0_u32,
15294        latitude: 0_i32,
15295        longitude: 0_i32,
15296        roll: 0_i16,
15297        pitch: 0_i16,
15298        heading: 0_u16,
15299        heading_sp: 0_i16,
15300        altitude_amsl: 0_i16,
15301        altitude_sp: 0_i16,
15302        wp_distance: 0_u16,
15303        base_mode: MavModeFlag::DEFAULT,
15304        landed_state: MavLandedState::DEFAULT,
15305        throttle: 0_i8,
15306        airspeed: 0_u8,
15307        airspeed_sp: 0_u8,
15308        groundspeed: 0_u8,
15309        climb_rate: 0_i8,
15310        gps_nsat: 0_u8,
15311        gps_fix_type: GpsFixType::DEFAULT,
15312        battery_remaining: 0_u8,
15313        temperature: 0_i8,
15314        temperature_air: 0_i8,
15315        failsafe: 0_u8,
15316        wp_num: 0_u8,
15317    };
15318    #[cfg(feature = "arbitrary")]
15319    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15320        use arbitrary::{Arbitrary, Unstructured};
15321        let mut buf = [0u8; 1024];
15322        rng.fill_bytes(&mut buf);
15323        let mut unstructured = Unstructured::new(&buf);
15324        Self::arbitrary(&mut unstructured).unwrap_or_default()
15325    }
15326}
15327impl Default for HIGH_LATENCY_DATA {
15328    fn default() -> Self {
15329        Self::DEFAULT.clone()
15330    }
15331}
15332impl MessageData for HIGH_LATENCY_DATA {
15333    type Message = MavMessage;
15334    const ID: u32 = 234u32;
15335    const NAME: &'static str = "HIGH_LATENCY";
15336    const EXTRA_CRC: u8 = 150u8;
15337    const ENCODED_LEN: usize = 40usize;
15338    fn deser(
15339        _version: MavlinkVersion,
15340        __input: &[u8],
15341    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15342        let avail_len = __input.len();
15343        let mut payload_buf = [0; Self::ENCODED_LEN];
15344        let mut buf = if avail_len < Self::ENCODED_LEN {
15345            payload_buf[0..avail_len].copy_from_slice(__input);
15346            Bytes::new(&payload_buf)
15347        } else {
15348            Bytes::new(__input)
15349        };
15350        let mut __struct = Self::default();
15351        __struct.custom_mode = buf.get_u32_le();
15352        __struct.latitude = buf.get_i32_le();
15353        __struct.longitude = buf.get_i32_le();
15354        __struct.roll = buf.get_i16_le();
15355        __struct.pitch = buf.get_i16_le();
15356        __struct.heading = buf.get_u16_le();
15357        __struct.heading_sp = buf.get_i16_le();
15358        __struct.altitude_amsl = buf.get_i16_le();
15359        __struct.altitude_sp = buf.get_i16_le();
15360        __struct.wp_distance = buf.get_u16_le();
15361        let tmp = buf.get_u8();
15362        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15363            ::mavlink_core::error::ParserError::InvalidFlag {
15364                flag_type: "MavModeFlag",
15365                value: tmp as u32,
15366            },
15367        )?;
15368        let tmp = buf.get_u8();
15369        __struct.landed_state =
15370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15371                enum_type: "MavLandedState",
15372                value: tmp as u32,
15373            })?;
15374        __struct.throttle = buf.get_i8();
15375        __struct.airspeed = buf.get_u8();
15376        __struct.airspeed_sp = buf.get_u8();
15377        __struct.groundspeed = buf.get_u8();
15378        __struct.climb_rate = buf.get_i8();
15379        __struct.gps_nsat = buf.get_u8();
15380        let tmp = buf.get_u8();
15381        __struct.gps_fix_type =
15382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15383                enum_type: "GpsFixType",
15384                value: tmp as u32,
15385            })?;
15386        __struct.battery_remaining = buf.get_u8();
15387        __struct.temperature = buf.get_i8();
15388        __struct.temperature_air = buf.get_i8();
15389        __struct.failsafe = buf.get_u8();
15390        __struct.wp_num = buf.get_u8();
15391        Ok(__struct)
15392    }
15393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15394        let mut __tmp = BytesMut::new(bytes);
15395        #[allow(clippy::absurd_extreme_comparisons)]
15396        #[allow(unused_comparisons)]
15397        if __tmp.remaining() < Self::ENCODED_LEN {
15398            panic!(
15399                "buffer is too small (need {} bytes, but got {})",
15400                Self::ENCODED_LEN,
15401                __tmp.remaining(),
15402            )
15403        }
15404        __tmp.put_u32_le(self.custom_mode);
15405        __tmp.put_i32_le(self.latitude);
15406        __tmp.put_i32_le(self.longitude);
15407        __tmp.put_i16_le(self.roll);
15408        __tmp.put_i16_le(self.pitch);
15409        __tmp.put_u16_le(self.heading);
15410        __tmp.put_i16_le(self.heading_sp);
15411        __tmp.put_i16_le(self.altitude_amsl);
15412        __tmp.put_i16_le(self.altitude_sp);
15413        __tmp.put_u16_le(self.wp_distance);
15414        __tmp.put_u8(self.base_mode.bits());
15415        __tmp.put_u8(self.landed_state as u8);
15416        __tmp.put_i8(self.throttle);
15417        __tmp.put_u8(self.airspeed);
15418        __tmp.put_u8(self.airspeed_sp);
15419        __tmp.put_u8(self.groundspeed);
15420        __tmp.put_i8(self.climb_rate);
15421        __tmp.put_u8(self.gps_nsat);
15422        __tmp.put_u8(self.gps_fix_type as u8);
15423        __tmp.put_u8(self.battery_remaining);
15424        __tmp.put_i8(self.temperature);
15425        __tmp.put_i8(self.temperature_air);
15426        __tmp.put_u8(self.failsafe);
15427        __tmp.put_u8(self.wp_num);
15428        if matches!(version, MavlinkVersion::V2) {
15429            let len = __tmp.len();
15430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15431        } else {
15432            __tmp.len()
15433        }
15434    }
15435}
15436#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15437#[doc = ""]
15438#[doc = "ID: 235"]
15439#[derive(Debug, Clone, PartialEq)]
15440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15442#[cfg_attr(feature = "ts", derive(TS))]
15443#[cfg_attr(feature = "ts", ts(export))]
15444pub struct HIGH_LATENCY2_DATA {
15445    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15446    pub timestamp: u32,
15447    #[doc = "Latitude"]
15448    pub latitude: i32,
15449    #[doc = "Longitude"]
15450    pub longitude: i32,
15451    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15452    pub custom_mode: u16,
15453    #[doc = "Altitude above mean sea level"]
15454    pub altitude: i16,
15455    #[doc = "Altitude setpoint"]
15456    pub target_altitude: i16,
15457    #[doc = "Distance to target waypoint or position"]
15458    pub target_distance: u16,
15459    #[doc = "Current waypoint number"]
15460    pub wp_num: u16,
15461    #[doc = "Bitmap of failure flags."]
15462    pub failure_flags: HlFailureFlag,
15463    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15464    pub mavtype: MavType,
15465    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15466    pub autopilot: MavAutopilot,
15467    #[doc = "Heading"]
15468    pub heading: u8,
15469    #[doc = "Heading setpoint"]
15470    pub target_heading: u8,
15471    #[doc = "Throttle"]
15472    pub throttle: u8,
15473    #[doc = "Airspeed"]
15474    pub airspeed: u8,
15475    #[doc = "Airspeed setpoint"]
15476    pub airspeed_sp: u8,
15477    #[doc = "Groundspeed"]
15478    pub groundspeed: u8,
15479    #[doc = "Windspeed"]
15480    pub windspeed: u8,
15481    #[doc = "Wind heading"]
15482    pub wind_heading: u8,
15483    #[doc = "Maximum error horizontal position since last message"]
15484    pub eph: u8,
15485    #[doc = "Maximum error vertical position since last message"]
15486    pub epv: u8,
15487    #[doc = "Air temperature"]
15488    pub temperature_air: i8,
15489    #[doc = "Maximum climb rate magnitude since last message"]
15490    pub climb_rate: i8,
15491    #[doc = "Battery level (-1 if field not provided)."]
15492    pub battery: i8,
15493    #[doc = "Field for custom payload."]
15494    pub custom0: i8,
15495    #[doc = "Field for custom payload."]
15496    pub custom1: i8,
15497    #[doc = "Field for custom payload."]
15498    pub custom2: i8,
15499}
15500impl HIGH_LATENCY2_DATA {
15501    pub const ENCODED_LEN: usize = 42usize;
15502    pub const DEFAULT: Self = Self {
15503        timestamp: 0_u32,
15504        latitude: 0_i32,
15505        longitude: 0_i32,
15506        custom_mode: 0_u16,
15507        altitude: 0_i16,
15508        target_altitude: 0_i16,
15509        target_distance: 0_u16,
15510        wp_num: 0_u16,
15511        failure_flags: HlFailureFlag::DEFAULT,
15512        mavtype: MavType::DEFAULT,
15513        autopilot: MavAutopilot::DEFAULT,
15514        heading: 0_u8,
15515        target_heading: 0_u8,
15516        throttle: 0_u8,
15517        airspeed: 0_u8,
15518        airspeed_sp: 0_u8,
15519        groundspeed: 0_u8,
15520        windspeed: 0_u8,
15521        wind_heading: 0_u8,
15522        eph: 0_u8,
15523        epv: 0_u8,
15524        temperature_air: 0_i8,
15525        climb_rate: 0_i8,
15526        battery: 0_i8,
15527        custom0: 0_i8,
15528        custom1: 0_i8,
15529        custom2: 0_i8,
15530    };
15531    #[cfg(feature = "arbitrary")]
15532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15533        use arbitrary::{Arbitrary, Unstructured};
15534        let mut buf = [0u8; 1024];
15535        rng.fill_bytes(&mut buf);
15536        let mut unstructured = Unstructured::new(&buf);
15537        Self::arbitrary(&mut unstructured).unwrap_or_default()
15538    }
15539}
15540impl Default for HIGH_LATENCY2_DATA {
15541    fn default() -> Self {
15542        Self::DEFAULT.clone()
15543    }
15544}
15545impl MessageData for HIGH_LATENCY2_DATA {
15546    type Message = MavMessage;
15547    const ID: u32 = 235u32;
15548    const NAME: &'static str = "HIGH_LATENCY2";
15549    const EXTRA_CRC: u8 = 179u8;
15550    const ENCODED_LEN: usize = 42usize;
15551    fn deser(
15552        _version: MavlinkVersion,
15553        __input: &[u8],
15554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15555        let avail_len = __input.len();
15556        let mut payload_buf = [0; Self::ENCODED_LEN];
15557        let mut buf = if avail_len < Self::ENCODED_LEN {
15558            payload_buf[0..avail_len].copy_from_slice(__input);
15559            Bytes::new(&payload_buf)
15560        } else {
15561            Bytes::new(__input)
15562        };
15563        let mut __struct = Self::default();
15564        __struct.timestamp = buf.get_u32_le();
15565        __struct.latitude = buf.get_i32_le();
15566        __struct.longitude = buf.get_i32_le();
15567        __struct.custom_mode = buf.get_u16_le();
15568        __struct.altitude = buf.get_i16_le();
15569        __struct.target_altitude = buf.get_i16_le();
15570        __struct.target_distance = buf.get_u16_le();
15571        __struct.wp_num = buf.get_u16_le();
15572        let tmp = buf.get_u16_le();
15573        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15574            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15575                flag_type: "HlFailureFlag",
15576                value: tmp as u32,
15577            })?;
15578        let tmp = buf.get_u8();
15579        __struct.mavtype =
15580            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15581                enum_type: "MavType",
15582                value: tmp as u32,
15583            })?;
15584        let tmp = buf.get_u8();
15585        __struct.autopilot =
15586            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15587                enum_type: "MavAutopilot",
15588                value: tmp as u32,
15589            })?;
15590        __struct.heading = buf.get_u8();
15591        __struct.target_heading = buf.get_u8();
15592        __struct.throttle = buf.get_u8();
15593        __struct.airspeed = buf.get_u8();
15594        __struct.airspeed_sp = buf.get_u8();
15595        __struct.groundspeed = buf.get_u8();
15596        __struct.windspeed = buf.get_u8();
15597        __struct.wind_heading = buf.get_u8();
15598        __struct.eph = buf.get_u8();
15599        __struct.epv = buf.get_u8();
15600        __struct.temperature_air = buf.get_i8();
15601        __struct.climb_rate = buf.get_i8();
15602        __struct.battery = buf.get_i8();
15603        __struct.custom0 = buf.get_i8();
15604        __struct.custom1 = buf.get_i8();
15605        __struct.custom2 = buf.get_i8();
15606        Ok(__struct)
15607    }
15608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15609        let mut __tmp = BytesMut::new(bytes);
15610        #[allow(clippy::absurd_extreme_comparisons)]
15611        #[allow(unused_comparisons)]
15612        if __tmp.remaining() < Self::ENCODED_LEN {
15613            panic!(
15614                "buffer is too small (need {} bytes, but got {})",
15615                Self::ENCODED_LEN,
15616                __tmp.remaining(),
15617            )
15618        }
15619        __tmp.put_u32_le(self.timestamp);
15620        __tmp.put_i32_le(self.latitude);
15621        __tmp.put_i32_le(self.longitude);
15622        __tmp.put_u16_le(self.custom_mode);
15623        __tmp.put_i16_le(self.altitude);
15624        __tmp.put_i16_le(self.target_altitude);
15625        __tmp.put_u16_le(self.target_distance);
15626        __tmp.put_u16_le(self.wp_num);
15627        __tmp.put_u16_le(self.failure_flags.bits());
15628        __tmp.put_u8(self.mavtype as u8);
15629        __tmp.put_u8(self.autopilot as u8);
15630        __tmp.put_u8(self.heading);
15631        __tmp.put_u8(self.target_heading);
15632        __tmp.put_u8(self.throttle);
15633        __tmp.put_u8(self.airspeed);
15634        __tmp.put_u8(self.airspeed_sp);
15635        __tmp.put_u8(self.groundspeed);
15636        __tmp.put_u8(self.windspeed);
15637        __tmp.put_u8(self.wind_heading);
15638        __tmp.put_u8(self.eph);
15639        __tmp.put_u8(self.epv);
15640        __tmp.put_i8(self.temperature_air);
15641        __tmp.put_i8(self.climb_rate);
15642        __tmp.put_i8(self.battery);
15643        __tmp.put_i8(self.custom0);
15644        __tmp.put_i8(self.custom1);
15645        __tmp.put_i8(self.custom2);
15646        if matches!(version, MavlinkVersion::V2) {
15647            let len = __tmp.len();
15648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15649        } else {
15650            __tmp.len()
15651        }
15652    }
15653}
15654#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15655#[doc = ""]
15656#[doc = "ID: 93"]
15657#[derive(Debug, Clone, PartialEq)]
15658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15660#[cfg_attr(feature = "ts", derive(TS))]
15661#[cfg_attr(feature = "ts", ts(export))]
15662pub struct HIL_ACTUATOR_CONTROLS_DATA {
15663    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15664    pub time_usec: u64,
15665    #[doc = "Flags bitmask."]
15666    pub flags: HilActuatorControlsFlags,
15667    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15669    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15670    pub controls: [f32; 16],
15671    #[doc = "System mode. Includes arming state."]
15672    pub mode: MavModeFlag,
15673}
15674impl HIL_ACTUATOR_CONTROLS_DATA {
15675    pub const ENCODED_LEN: usize = 81usize;
15676    pub const DEFAULT: Self = Self {
15677        time_usec: 0_u64,
15678        flags: HilActuatorControlsFlags::DEFAULT,
15679        controls: [0.0_f32; 16usize],
15680        mode: MavModeFlag::DEFAULT,
15681    };
15682    #[cfg(feature = "arbitrary")]
15683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15684        use arbitrary::{Arbitrary, Unstructured};
15685        let mut buf = [0u8; 1024];
15686        rng.fill_bytes(&mut buf);
15687        let mut unstructured = Unstructured::new(&buf);
15688        Self::arbitrary(&mut unstructured).unwrap_or_default()
15689    }
15690}
15691impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15692    fn default() -> Self {
15693        Self::DEFAULT.clone()
15694    }
15695}
15696impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15697    type Message = MavMessage;
15698    const ID: u32 = 93u32;
15699    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15700    const EXTRA_CRC: u8 = 47u8;
15701    const ENCODED_LEN: usize = 81usize;
15702    fn deser(
15703        _version: MavlinkVersion,
15704        __input: &[u8],
15705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15706        let avail_len = __input.len();
15707        let mut payload_buf = [0; Self::ENCODED_LEN];
15708        let mut buf = if avail_len < Self::ENCODED_LEN {
15709            payload_buf[0..avail_len].copy_from_slice(__input);
15710            Bytes::new(&payload_buf)
15711        } else {
15712            Bytes::new(__input)
15713        };
15714        let mut __struct = Self::default();
15715        __struct.time_usec = buf.get_u64_le();
15716        let tmp = buf.get_u64_le();
15717        __struct.flags =
15718            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15719                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15720                    flag_type: "HilActuatorControlsFlags",
15721                    value: tmp as u32,
15722                })?;
15723        for v in &mut __struct.controls {
15724            let val = buf.get_f32_le();
15725            *v = val;
15726        }
15727        let tmp = buf.get_u8();
15728        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15729            ::mavlink_core::error::ParserError::InvalidFlag {
15730                flag_type: "MavModeFlag",
15731                value: tmp as u32,
15732            },
15733        )?;
15734        Ok(__struct)
15735    }
15736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15737        let mut __tmp = BytesMut::new(bytes);
15738        #[allow(clippy::absurd_extreme_comparisons)]
15739        #[allow(unused_comparisons)]
15740        if __tmp.remaining() < Self::ENCODED_LEN {
15741            panic!(
15742                "buffer is too small (need {} bytes, but got {})",
15743                Self::ENCODED_LEN,
15744                __tmp.remaining(),
15745            )
15746        }
15747        __tmp.put_u64_le(self.time_usec);
15748        __tmp.put_u64_le(self.flags.bits());
15749        for val in &self.controls {
15750            __tmp.put_f32_le(*val);
15751        }
15752        __tmp.put_u8(self.mode.bits());
15753        if matches!(version, MavlinkVersion::V2) {
15754            let len = __tmp.len();
15755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15756        } else {
15757            __tmp.len()
15758        }
15759    }
15760}
15761#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15762#[doc = ""]
15763#[doc = "ID: 91"]
15764#[derive(Debug, Clone, PartialEq)]
15765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15767#[cfg_attr(feature = "ts", derive(TS))]
15768#[cfg_attr(feature = "ts", ts(export))]
15769pub struct HIL_CONTROLS_DATA {
15770    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15771    pub time_usec: u64,
15772    #[doc = "Control output -1 .. 1"]
15773    pub roll_ailerons: f32,
15774    #[doc = "Control output -1 .. 1"]
15775    pub pitch_elevator: f32,
15776    #[doc = "Control output -1 .. 1"]
15777    pub yaw_rudder: f32,
15778    #[doc = "Throttle 0 .. 1"]
15779    pub throttle: f32,
15780    #[doc = "Aux 1, -1 .. 1"]
15781    pub aux1: f32,
15782    #[doc = "Aux 2, -1 .. 1"]
15783    pub aux2: f32,
15784    #[doc = "Aux 3, -1 .. 1"]
15785    pub aux3: f32,
15786    #[doc = "Aux 4, -1 .. 1"]
15787    pub aux4: f32,
15788    #[doc = "System mode."]
15789    pub mode: MavMode,
15790    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15791    pub nav_mode: u8,
15792}
15793impl HIL_CONTROLS_DATA {
15794    pub const ENCODED_LEN: usize = 42usize;
15795    pub const DEFAULT: Self = Self {
15796        time_usec: 0_u64,
15797        roll_ailerons: 0.0_f32,
15798        pitch_elevator: 0.0_f32,
15799        yaw_rudder: 0.0_f32,
15800        throttle: 0.0_f32,
15801        aux1: 0.0_f32,
15802        aux2: 0.0_f32,
15803        aux3: 0.0_f32,
15804        aux4: 0.0_f32,
15805        mode: MavMode::DEFAULT,
15806        nav_mode: 0_u8,
15807    };
15808    #[cfg(feature = "arbitrary")]
15809    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15810        use arbitrary::{Arbitrary, Unstructured};
15811        let mut buf = [0u8; 1024];
15812        rng.fill_bytes(&mut buf);
15813        let mut unstructured = Unstructured::new(&buf);
15814        Self::arbitrary(&mut unstructured).unwrap_or_default()
15815    }
15816}
15817impl Default for HIL_CONTROLS_DATA {
15818    fn default() -> Self {
15819        Self::DEFAULT.clone()
15820    }
15821}
15822impl MessageData for HIL_CONTROLS_DATA {
15823    type Message = MavMessage;
15824    const ID: u32 = 91u32;
15825    const NAME: &'static str = "HIL_CONTROLS";
15826    const EXTRA_CRC: u8 = 63u8;
15827    const ENCODED_LEN: usize = 42usize;
15828    fn deser(
15829        _version: MavlinkVersion,
15830        __input: &[u8],
15831    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15832        let avail_len = __input.len();
15833        let mut payload_buf = [0; Self::ENCODED_LEN];
15834        let mut buf = if avail_len < Self::ENCODED_LEN {
15835            payload_buf[0..avail_len].copy_from_slice(__input);
15836            Bytes::new(&payload_buf)
15837        } else {
15838            Bytes::new(__input)
15839        };
15840        let mut __struct = Self::default();
15841        __struct.time_usec = buf.get_u64_le();
15842        __struct.roll_ailerons = buf.get_f32_le();
15843        __struct.pitch_elevator = buf.get_f32_le();
15844        __struct.yaw_rudder = buf.get_f32_le();
15845        __struct.throttle = buf.get_f32_le();
15846        __struct.aux1 = buf.get_f32_le();
15847        __struct.aux2 = buf.get_f32_le();
15848        __struct.aux3 = buf.get_f32_le();
15849        __struct.aux4 = buf.get_f32_le();
15850        let tmp = buf.get_u8();
15851        __struct.mode =
15852            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15853                enum_type: "MavMode",
15854                value: tmp as u32,
15855            })?;
15856        __struct.nav_mode = buf.get_u8();
15857        Ok(__struct)
15858    }
15859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15860        let mut __tmp = BytesMut::new(bytes);
15861        #[allow(clippy::absurd_extreme_comparisons)]
15862        #[allow(unused_comparisons)]
15863        if __tmp.remaining() < Self::ENCODED_LEN {
15864            panic!(
15865                "buffer is too small (need {} bytes, but got {})",
15866                Self::ENCODED_LEN,
15867                __tmp.remaining(),
15868            )
15869        }
15870        __tmp.put_u64_le(self.time_usec);
15871        __tmp.put_f32_le(self.roll_ailerons);
15872        __tmp.put_f32_le(self.pitch_elevator);
15873        __tmp.put_f32_le(self.yaw_rudder);
15874        __tmp.put_f32_le(self.throttle);
15875        __tmp.put_f32_le(self.aux1);
15876        __tmp.put_f32_le(self.aux2);
15877        __tmp.put_f32_le(self.aux3);
15878        __tmp.put_f32_le(self.aux4);
15879        __tmp.put_u8(self.mode as u8);
15880        __tmp.put_u8(self.nav_mode);
15881        if matches!(version, MavlinkVersion::V2) {
15882            let len = __tmp.len();
15883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15884        } else {
15885            __tmp.len()
15886        }
15887    }
15888}
15889#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15890#[doc = ""]
15891#[doc = "ID: 113"]
15892#[derive(Debug, Clone, PartialEq)]
15893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15895#[cfg_attr(feature = "ts", derive(TS))]
15896#[cfg_attr(feature = "ts", ts(export))]
15897pub struct HIL_GPS_DATA {
15898    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15899    pub time_usec: u64,
15900    #[doc = "Latitude (WGS84)"]
15901    pub lat: i32,
15902    #[doc = "Longitude (WGS84)"]
15903    pub lon: i32,
15904    #[doc = "Altitude (MSL). Positive for up."]
15905    pub alt: i32,
15906    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15907    pub eph: u16,
15908    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15909    pub epv: u16,
15910    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15911    pub vel: u16,
15912    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15913    pub vn: i16,
15914    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15915    pub ve: i16,
15916    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15917    pub vd: i16,
15918    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15919    pub cog: u16,
15920    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15921    pub fix_type: u8,
15922    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15923    pub satellites_visible: u8,
15924    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15925    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15926    pub id: u8,
15927    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15929    pub yaw: u16,
15930}
15931impl HIL_GPS_DATA {
15932    pub const ENCODED_LEN: usize = 39usize;
15933    pub const DEFAULT: Self = Self {
15934        time_usec: 0_u64,
15935        lat: 0_i32,
15936        lon: 0_i32,
15937        alt: 0_i32,
15938        eph: 0_u16,
15939        epv: 0_u16,
15940        vel: 0_u16,
15941        vn: 0_i16,
15942        ve: 0_i16,
15943        vd: 0_i16,
15944        cog: 0_u16,
15945        fix_type: 0_u8,
15946        satellites_visible: 0_u8,
15947        id: 0_u8,
15948        yaw: 0_u16,
15949    };
15950    #[cfg(feature = "arbitrary")]
15951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15952        use arbitrary::{Arbitrary, Unstructured};
15953        let mut buf = [0u8; 1024];
15954        rng.fill_bytes(&mut buf);
15955        let mut unstructured = Unstructured::new(&buf);
15956        Self::arbitrary(&mut unstructured).unwrap_or_default()
15957    }
15958}
15959impl Default for HIL_GPS_DATA {
15960    fn default() -> Self {
15961        Self::DEFAULT.clone()
15962    }
15963}
15964impl MessageData for HIL_GPS_DATA {
15965    type Message = MavMessage;
15966    const ID: u32 = 113u32;
15967    const NAME: &'static str = "HIL_GPS";
15968    const EXTRA_CRC: u8 = 124u8;
15969    const ENCODED_LEN: usize = 39usize;
15970    fn deser(
15971        _version: MavlinkVersion,
15972        __input: &[u8],
15973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15974        let avail_len = __input.len();
15975        let mut payload_buf = [0; Self::ENCODED_LEN];
15976        let mut buf = if avail_len < Self::ENCODED_LEN {
15977            payload_buf[0..avail_len].copy_from_slice(__input);
15978            Bytes::new(&payload_buf)
15979        } else {
15980            Bytes::new(__input)
15981        };
15982        let mut __struct = Self::default();
15983        __struct.time_usec = buf.get_u64_le();
15984        __struct.lat = buf.get_i32_le();
15985        __struct.lon = buf.get_i32_le();
15986        __struct.alt = buf.get_i32_le();
15987        __struct.eph = buf.get_u16_le();
15988        __struct.epv = buf.get_u16_le();
15989        __struct.vel = buf.get_u16_le();
15990        __struct.vn = buf.get_i16_le();
15991        __struct.ve = buf.get_i16_le();
15992        __struct.vd = buf.get_i16_le();
15993        __struct.cog = buf.get_u16_le();
15994        __struct.fix_type = buf.get_u8();
15995        __struct.satellites_visible = buf.get_u8();
15996        __struct.id = buf.get_u8();
15997        __struct.yaw = buf.get_u16_le();
15998        Ok(__struct)
15999    }
16000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16001        let mut __tmp = BytesMut::new(bytes);
16002        #[allow(clippy::absurd_extreme_comparisons)]
16003        #[allow(unused_comparisons)]
16004        if __tmp.remaining() < Self::ENCODED_LEN {
16005            panic!(
16006                "buffer is too small (need {} bytes, but got {})",
16007                Self::ENCODED_LEN,
16008                __tmp.remaining(),
16009            )
16010        }
16011        __tmp.put_u64_le(self.time_usec);
16012        __tmp.put_i32_le(self.lat);
16013        __tmp.put_i32_le(self.lon);
16014        __tmp.put_i32_le(self.alt);
16015        __tmp.put_u16_le(self.eph);
16016        __tmp.put_u16_le(self.epv);
16017        __tmp.put_u16_le(self.vel);
16018        __tmp.put_i16_le(self.vn);
16019        __tmp.put_i16_le(self.ve);
16020        __tmp.put_i16_le(self.vd);
16021        __tmp.put_u16_le(self.cog);
16022        __tmp.put_u8(self.fix_type);
16023        __tmp.put_u8(self.satellites_visible);
16024        if matches!(version, MavlinkVersion::V2) {
16025            __tmp.put_u8(self.id);
16026            __tmp.put_u16_le(self.yaw);
16027            let len = __tmp.len();
16028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16029        } else {
16030            __tmp.len()
16031        }
16032    }
16033}
16034#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16035#[doc = ""]
16036#[doc = "ID: 114"]
16037#[derive(Debug, Clone, PartialEq)]
16038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16040#[cfg_attr(feature = "ts", derive(TS))]
16041#[cfg_attr(feature = "ts", ts(export))]
16042pub struct HIL_OPTICAL_FLOW_DATA {
16043    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16044    pub time_usec: u64,
16045    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16046    pub integration_time_us: u32,
16047    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16048    pub integrated_x: f32,
16049    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16050    pub integrated_y: f32,
16051    #[doc = "RH rotation around X axis"]
16052    pub integrated_xgyro: f32,
16053    #[doc = "RH rotation around Y axis"]
16054    pub integrated_ygyro: f32,
16055    #[doc = "RH rotation around Z axis"]
16056    pub integrated_zgyro: f32,
16057    #[doc = "Time since the distance was sampled."]
16058    pub time_delta_distance_us: u32,
16059    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16060    pub distance: f32,
16061    #[doc = "Temperature"]
16062    pub temperature: i16,
16063    #[doc = "Sensor ID"]
16064    pub sensor_id: u8,
16065    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16066    pub quality: u8,
16067}
16068impl HIL_OPTICAL_FLOW_DATA {
16069    pub const ENCODED_LEN: usize = 44usize;
16070    pub const DEFAULT: Self = Self {
16071        time_usec: 0_u64,
16072        integration_time_us: 0_u32,
16073        integrated_x: 0.0_f32,
16074        integrated_y: 0.0_f32,
16075        integrated_xgyro: 0.0_f32,
16076        integrated_ygyro: 0.0_f32,
16077        integrated_zgyro: 0.0_f32,
16078        time_delta_distance_us: 0_u32,
16079        distance: 0.0_f32,
16080        temperature: 0_i16,
16081        sensor_id: 0_u8,
16082        quality: 0_u8,
16083    };
16084    #[cfg(feature = "arbitrary")]
16085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16086        use arbitrary::{Arbitrary, Unstructured};
16087        let mut buf = [0u8; 1024];
16088        rng.fill_bytes(&mut buf);
16089        let mut unstructured = Unstructured::new(&buf);
16090        Self::arbitrary(&mut unstructured).unwrap_or_default()
16091    }
16092}
16093impl Default for HIL_OPTICAL_FLOW_DATA {
16094    fn default() -> Self {
16095        Self::DEFAULT.clone()
16096    }
16097}
16098impl MessageData for HIL_OPTICAL_FLOW_DATA {
16099    type Message = MavMessage;
16100    const ID: u32 = 114u32;
16101    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16102    const EXTRA_CRC: u8 = 237u8;
16103    const ENCODED_LEN: usize = 44usize;
16104    fn deser(
16105        _version: MavlinkVersion,
16106        __input: &[u8],
16107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16108        let avail_len = __input.len();
16109        let mut payload_buf = [0; Self::ENCODED_LEN];
16110        let mut buf = if avail_len < Self::ENCODED_LEN {
16111            payload_buf[0..avail_len].copy_from_slice(__input);
16112            Bytes::new(&payload_buf)
16113        } else {
16114            Bytes::new(__input)
16115        };
16116        let mut __struct = Self::default();
16117        __struct.time_usec = buf.get_u64_le();
16118        __struct.integration_time_us = buf.get_u32_le();
16119        __struct.integrated_x = buf.get_f32_le();
16120        __struct.integrated_y = buf.get_f32_le();
16121        __struct.integrated_xgyro = buf.get_f32_le();
16122        __struct.integrated_ygyro = buf.get_f32_le();
16123        __struct.integrated_zgyro = buf.get_f32_le();
16124        __struct.time_delta_distance_us = buf.get_u32_le();
16125        __struct.distance = buf.get_f32_le();
16126        __struct.temperature = buf.get_i16_le();
16127        __struct.sensor_id = buf.get_u8();
16128        __struct.quality = buf.get_u8();
16129        Ok(__struct)
16130    }
16131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16132        let mut __tmp = BytesMut::new(bytes);
16133        #[allow(clippy::absurd_extreme_comparisons)]
16134        #[allow(unused_comparisons)]
16135        if __tmp.remaining() < Self::ENCODED_LEN {
16136            panic!(
16137                "buffer is too small (need {} bytes, but got {})",
16138                Self::ENCODED_LEN,
16139                __tmp.remaining(),
16140            )
16141        }
16142        __tmp.put_u64_le(self.time_usec);
16143        __tmp.put_u32_le(self.integration_time_us);
16144        __tmp.put_f32_le(self.integrated_x);
16145        __tmp.put_f32_le(self.integrated_y);
16146        __tmp.put_f32_le(self.integrated_xgyro);
16147        __tmp.put_f32_le(self.integrated_ygyro);
16148        __tmp.put_f32_le(self.integrated_zgyro);
16149        __tmp.put_u32_le(self.time_delta_distance_us);
16150        __tmp.put_f32_le(self.distance);
16151        __tmp.put_i16_le(self.temperature);
16152        __tmp.put_u8(self.sensor_id);
16153        __tmp.put_u8(self.quality);
16154        if matches!(version, MavlinkVersion::V2) {
16155            let len = __tmp.len();
16156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16157        } else {
16158            __tmp.len()
16159        }
16160    }
16161}
16162#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16163#[doc = ""]
16164#[doc = "ID: 92"]
16165#[derive(Debug, Clone, PartialEq)]
16166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16168#[cfg_attr(feature = "ts", derive(TS))]
16169#[cfg_attr(feature = "ts", ts(export))]
16170pub struct HIL_RC_INPUTS_RAW_DATA {
16171    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16172    pub time_usec: u64,
16173    #[doc = "RC channel 1 value"]
16174    pub chan1_raw: u16,
16175    #[doc = "RC channel 2 value"]
16176    pub chan2_raw: u16,
16177    #[doc = "RC channel 3 value"]
16178    pub chan3_raw: u16,
16179    #[doc = "RC channel 4 value"]
16180    pub chan4_raw: u16,
16181    #[doc = "RC channel 5 value"]
16182    pub chan5_raw: u16,
16183    #[doc = "RC channel 6 value"]
16184    pub chan6_raw: u16,
16185    #[doc = "RC channel 7 value"]
16186    pub chan7_raw: u16,
16187    #[doc = "RC channel 8 value"]
16188    pub chan8_raw: u16,
16189    #[doc = "RC channel 9 value"]
16190    pub chan9_raw: u16,
16191    #[doc = "RC channel 10 value"]
16192    pub chan10_raw: u16,
16193    #[doc = "RC channel 11 value"]
16194    pub chan11_raw: u16,
16195    #[doc = "RC channel 12 value"]
16196    pub chan12_raw: u16,
16197    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16198    pub rssi: u8,
16199}
16200impl HIL_RC_INPUTS_RAW_DATA {
16201    pub const ENCODED_LEN: usize = 33usize;
16202    pub const DEFAULT: Self = Self {
16203        time_usec: 0_u64,
16204        chan1_raw: 0_u16,
16205        chan2_raw: 0_u16,
16206        chan3_raw: 0_u16,
16207        chan4_raw: 0_u16,
16208        chan5_raw: 0_u16,
16209        chan6_raw: 0_u16,
16210        chan7_raw: 0_u16,
16211        chan8_raw: 0_u16,
16212        chan9_raw: 0_u16,
16213        chan10_raw: 0_u16,
16214        chan11_raw: 0_u16,
16215        chan12_raw: 0_u16,
16216        rssi: 0_u8,
16217    };
16218    #[cfg(feature = "arbitrary")]
16219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16220        use arbitrary::{Arbitrary, Unstructured};
16221        let mut buf = [0u8; 1024];
16222        rng.fill_bytes(&mut buf);
16223        let mut unstructured = Unstructured::new(&buf);
16224        Self::arbitrary(&mut unstructured).unwrap_or_default()
16225    }
16226}
16227impl Default for HIL_RC_INPUTS_RAW_DATA {
16228    fn default() -> Self {
16229        Self::DEFAULT.clone()
16230    }
16231}
16232impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16233    type Message = MavMessage;
16234    const ID: u32 = 92u32;
16235    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16236    const EXTRA_CRC: u8 = 54u8;
16237    const ENCODED_LEN: usize = 33usize;
16238    fn deser(
16239        _version: MavlinkVersion,
16240        __input: &[u8],
16241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16242        let avail_len = __input.len();
16243        let mut payload_buf = [0; Self::ENCODED_LEN];
16244        let mut buf = if avail_len < Self::ENCODED_LEN {
16245            payload_buf[0..avail_len].copy_from_slice(__input);
16246            Bytes::new(&payload_buf)
16247        } else {
16248            Bytes::new(__input)
16249        };
16250        let mut __struct = Self::default();
16251        __struct.time_usec = buf.get_u64_le();
16252        __struct.chan1_raw = buf.get_u16_le();
16253        __struct.chan2_raw = buf.get_u16_le();
16254        __struct.chan3_raw = buf.get_u16_le();
16255        __struct.chan4_raw = buf.get_u16_le();
16256        __struct.chan5_raw = buf.get_u16_le();
16257        __struct.chan6_raw = buf.get_u16_le();
16258        __struct.chan7_raw = buf.get_u16_le();
16259        __struct.chan8_raw = buf.get_u16_le();
16260        __struct.chan9_raw = buf.get_u16_le();
16261        __struct.chan10_raw = buf.get_u16_le();
16262        __struct.chan11_raw = buf.get_u16_le();
16263        __struct.chan12_raw = buf.get_u16_le();
16264        __struct.rssi = buf.get_u8();
16265        Ok(__struct)
16266    }
16267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16268        let mut __tmp = BytesMut::new(bytes);
16269        #[allow(clippy::absurd_extreme_comparisons)]
16270        #[allow(unused_comparisons)]
16271        if __tmp.remaining() < Self::ENCODED_LEN {
16272            panic!(
16273                "buffer is too small (need {} bytes, but got {})",
16274                Self::ENCODED_LEN,
16275                __tmp.remaining(),
16276            )
16277        }
16278        __tmp.put_u64_le(self.time_usec);
16279        __tmp.put_u16_le(self.chan1_raw);
16280        __tmp.put_u16_le(self.chan2_raw);
16281        __tmp.put_u16_le(self.chan3_raw);
16282        __tmp.put_u16_le(self.chan4_raw);
16283        __tmp.put_u16_le(self.chan5_raw);
16284        __tmp.put_u16_le(self.chan6_raw);
16285        __tmp.put_u16_le(self.chan7_raw);
16286        __tmp.put_u16_le(self.chan8_raw);
16287        __tmp.put_u16_le(self.chan9_raw);
16288        __tmp.put_u16_le(self.chan10_raw);
16289        __tmp.put_u16_le(self.chan11_raw);
16290        __tmp.put_u16_le(self.chan12_raw);
16291        __tmp.put_u8(self.rssi);
16292        if matches!(version, MavlinkVersion::V2) {
16293            let len = __tmp.len();
16294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16295        } else {
16296            __tmp.len()
16297        }
16298    }
16299}
16300#[doc = "The IMU readings in SI units in NED body frame."]
16301#[doc = ""]
16302#[doc = "ID: 107"]
16303#[derive(Debug, Clone, PartialEq)]
16304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16306#[cfg_attr(feature = "ts", derive(TS))]
16307#[cfg_attr(feature = "ts", ts(export))]
16308pub struct HIL_SENSOR_DATA {
16309    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16310    pub time_usec: u64,
16311    #[doc = "X acceleration"]
16312    pub xacc: f32,
16313    #[doc = "Y acceleration"]
16314    pub yacc: f32,
16315    #[doc = "Z acceleration"]
16316    pub zacc: f32,
16317    #[doc = "Angular speed around X axis in body frame"]
16318    pub xgyro: f32,
16319    #[doc = "Angular speed around Y axis in body frame"]
16320    pub ygyro: f32,
16321    #[doc = "Angular speed around Z axis in body frame"]
16322    pub zgyro: f32,
16323    #[doc = "X Magnetic field"]
16324    pub xmag: f32,
16325    #[doc = "Y Magnetic field"]
16326    pub ymag: f32,
16327    #[doc = "Z Magnetic field"]
16328    pub zmag: f32,
16329    #[doc = "Absolute pressure"]
16330    pub abs_pressure: f32,
16331    #[doc = "Differential pressure (airspeed)"]
16332    pub diff_pressure: f32,
16333    #[doc = "Altitude calculated from pressure"]
16334    pub pressure_alt: f32,
16335    #[doc = "Temperature"]
16336    pub temperature: f32,
16337    #[doc = "Bitmap for fields that have updated since last message"]
16338    pub fields_updated: HilSensorUpdatedFlags,
16339    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16341    pub id: u8,
16342}
16343impl HIL_SENSOR_DATA {
16344    pub const ENCODED_LEN: usize = 65usize;
16345    pub const DEFAULT: Self = Self {
16346        time_usec: 0_u64,
16347        xacc: 0.0_f32,
16348        yacc: 0.0_f32,
16349        zacc: 0.0_f32,
16350        xgyro: 0.0_f32,
16351        ygyro: 0.0_f32,
16352        zgyro: 0.0_f32,
16353        xmag: 0.0_f32,
16354        ymag: 0.0_f32,
16355        zmag: 0.0_f32,
16356        abs_pressure: 0.0_f32,
16357        diff_pressure: 0.0_f32,
16358        pressure_alt: 0.0_f32,
16359        temperature: 0.0_f32,
16360        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16361        id: 0_u8,
16362    };
16363    #[cfg(feature = "arbitrary")]
16364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16365        use arbitrary::{Arbitrary, Unstructured};
16366        let mut buf = [0u8; 1024];
16367        rng.fill_bytes(&mut buf);
16368        let mut unstructured = Unstructured::new(&buf);
16369        Self::arbitrary(&mut unstructured).unwrap_or_default()
16370    }
16371}
16372impl Default for HIL_SENSOR_DATA {
16373    fn default() -> Self {
16374        Self::DEFAULT.clone()
16375    }
16376}
16377impl MessageData for HIL_SENSOR_DATA {
16378    type Message = MavMessage;
16379    const ID: u32 = 107u32;
16380    const NAME: &'static str = "HIL_SENSOR";
16381    const EXTRA_CRC: u8 = 108u8;
16382    const ENCODED_LEN: usize = 65usize;
16383    fn deser(
16384        _version: MavlinkVersion,
16385        __input: &[u8],
16386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16387        let avail_len = __input.len();
16388        let mut payload_buf = [0; Self::ENCODED_LEN];
16389        let mut buf = if avail_len < Self::ENCODED_LEN {
16390            payload_buf[0..avail_len].copy_from_slice(__input);
16391            Bytes::new(&payload_buf)
16392        } else {
16393            Bytes::new(__input)
16394        };
16395        let mut __struct = Self::default();
16396        __struct.time_usec = buf.get_u64_le();
16397        __struct.xacc = buf.get_f32_le();
16398        __struct.yacc = buf.get_f32_le();
16399        __struct.zacc = buf.get_f32_le();
16400        __struct.xgyro = buf.get_f32_le();
16401        __struct.ygyro = buf.get_f32_le();
16402        __struct.zgyro = buf.get_f32_le();
16403        __struct.xmag = buf.get_f32_le();
16404        __struct.ymag = buf.get_f32_le();
16405        __struct.zmag = buf.get_f32_le();
16406        __struct.abs_pressure = buf.get_f32_le();
16407        __struct.diff_pressure = buf.get_f32_le();
16408        __struct.pressure_alt = buf.get_f32_le();
16409        __struct.temperature = buf.get_f32_le();
16410        let tmp = buf.get_u32_le();
16411        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16412            tmp & HilSensorUpdatedFlags::all().bits(),
16413        )
16414        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16415            flag_type: "HilSensorUpdatedFlags",
16416            value: tmp as u32,
16417        })?;
16418        __struct.id = buf.get_u8();
16419        Ok(__struct)
16420    }
16421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16422        let mut __tmp = BytesMut::new(bytes);
16423        #[allow(clippy::absurd_extreme_comparisons)]
16424        #[allow(unused_comparisons)]
16425        if __tmp.remaining() < Self::ENCODED_LEN {
16426            panic!(
16427                "buffer is too small (need {} bytes, but got {})",
16428                Self::ENCODED_LEN,
16429                __tmp.remaining(),
16430            )
16431        }
16432        __tmp.put_u64_le(self.time_usec);
16433        __tmp.put_f32_le(self.xacc);
16434        __tmp.put_f32_le(self.yacc);
16435        __tmp.put_f32_le(self.zacc);
16436        __tmp.put_f32_le(self.xgyro);
16437        __tmp.put_f32_le(self.ygyro);
16438        __tmp.put_f32_le(self.zgyro);
16439        __tmp.put_f32_le(self.xmag);
16440        __tmp.put_f32_le(self.ymag);
16441        __tmp.put_f32_le(self.zmag);
16442        __tmp.put_f32_le(self.abs_pressure);
16443        __tmp.put_f32_le(self.diff_pressure);
16444        __tmp.put_f32_le(self.pressure_alt);
16445        __tmp.put_f32_le(self.temperature);
16446        __tmp.put_u32_le(self.fields_updated.bits());
16447        if matches!(version, MavlinkVersion::V2) {
16448            __tmp.put_u8(self.id);
16449            let len = __tmp.len();
16450            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16451        } else {
16452            __tmp.len()
16453        }
16454    }
16455}
16456#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16457#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16458#[doc = ""]
16459#[doc = "ID: 90"]
16460#[derive(Debug, Clone, PartialEq)]
16461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16463#[cfg_attr(feature = "ts", derive(TS))]
16464#[cfg_attr(feature = "ts", ts(export))]
16465pub struct HIL_STATE_DATA {
16466    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16467    pub time_usec: u64,
16468    #[doc = "Roll angle"]
16469    pub roll: f32,
16470    #[doc = "Pitch angle"]
16471    pub pitch: f32,
16472    #[doc = "Yaw angle"]
16473    pub yaw: f32,
16474    #[doc = "Body frame roll / phi angular speed"]
16475    pub rollspeed: f32,
16476    #[doc = "Body frame pitch / theta angular speed"]
16477    pub pitchspeed: f32,
16478    #[doc = "Body frame yaw / psi angular speed"]
16479    pub yawspeed: f32,
16480    #[doc = "Latitude"]
16481    pub lat: i32,
16482    #[doc = "Longitude"]
16483    pub lon: i32,
16484    #[doc = "Altitude"]
16485    pub alt: i32,
16486    #[doc = "Ground X Speed (Latitude)"]
16487    pub vx: i16,
16488    #[doc = "Ground Y Speed (Longitude)"]
16489    pub vy: i16,
16490    #[doc = "Ground Z Speed (Altitude)"]
16491    pub vz: i16,
16492    #[doc = "X acceleration"]
16493    pub xacc: i16,
16494    #[doc = "Y acceleration"]
16495    pub yacc: i16,
16496    #[doc = "Z acceleration"]
16497    pub zacc: i16,
16498}
16499impl HIL_STATE_DATA {
16500    pub const ENCODED_LEN: usize = 56usize;
16501    pub const DEFAULT: Self = Self {
16502        time_usec: 0_u64,
16503        roll: 0.0_f32,
16504        pitch: 0.0_f32,
16505        yaw: 0.0_f32,
16506        rollspeed: 0.0_f32,
16507        pitchspeed: 0.0_f32,
16508        yawspeed: 0.0_f32,
16509        lat: 0_i32,
16510        lon: 0_i32,
16511        alt: 0_i32,
16512        vx: 0_i16,
16513        vy: 0_i16,
16514        vz: 0_i16,
16515        xacc: 0_i16,
16516        yacc: 0_i16,
16517        zacc: 0_i16,
16518    };
16519    #[cfg(feature = "arbitrary")]
16520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16521        use arbitrary::{Arbitrary, Unstructured};
16522        let mut buf = [0u8; 1024];
16523        rng.fill_bytes(&mut buf);
16524        let mut unstructured = Unstructured::new(&buf);
16525        Self::arbitrary(&mut unstructured).unwrap_or_default()
16526    }
16527}
16528impl Default for HIL_STATE_DATA {
16529    fn default() -> Self {
16530        Self::DEFAULT.clone()
16531    }
16532}
16533impl MessageData for HIL_STATE_DATA {
16534    type Message = MavMessage;
16535    const ID: u32 = 90u32;
16536    const NAME: &'static str = "HIL_STATE";
16537    const EXTRA_CRC: u8 = 183u8;
16538    const ENCODED_LEN: usize = 56usize;
16539    fn deser(
16540        _version: MavlinkVersion,
16541        __input: &[u8],
16542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16543        let avail_len = __input.len();
16544        let mut payload_buf = [0; Self::ENCODED_LEN];
16545        let mut buf = if avail_len < Self::ENCODED_LEN {
16546            payload_buf[0..avail_len].copy_from_slice(__input);
16547            Bytes::new(&payload_buf)
16548        } else {
16549            Bytes::new(__input)
16550        };
16551        let mut __struct = Self::default();
16552        __struct.time_usec = buf.get_u64_le();
16553        __struct.roll = buf.get_f32_le();
16554        __struct.pitch = buf.get_f32_le();
16555        __struct.yaw = buf.get_f32_le();
16556        __struct.rollspeed = buf.get_f32_le();
16557        __struct.pitchspeed = buf.get_f32_le();
16558        __struct.yawspeed = buf.get_f32_le();
16559        __struct.lat = buf.get_i32_le();
16560        __struct.lon = buf.get_i32_le();
16561        __struct.alt = buf.get_i32_le();
16562        __struct.vx = buf.get_i16_le();
16563        __struct.vy = buf.get_i16_le();
16564        __struct.vz = buf.get_i16_le();
16565        __struct.xacc = buf.get_i16_le();
16566        __struct.yacc = buf.get_i16_le();
16567        __struct.zacc = buf.get_i16_le();
16568        Ok(__struct)
16569    }
16570    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16571        let mut __tmp = BytesMut::new(bytes);
16572        #[allow(clippy::absurd_extreme_comparisons)]
16573        #[allow(unused_comparisons)]
16574        if __tmp.remaining() < Self::ENCODED_LEN {
16575            panic!(
16576                "buffer is too small (need {} bytes, but got {})",
16577                Self::ENCODED_LEN,
16578                __tmp.remaining(),
16579            )
16580        }
16581        __tmp.put_u64_le(self.time_usec);
16582        __tmp.put_f32_le(self.roll);
16583        __tmp.put_f32_le(self.pitch);
16584        __tmp.put_f32_le(self.yaw);
16585        __tmp.put_f32_le(self.rollspeed);
16586        __tmp.put_f32_le(self.pitchspeed);
16587        __tmp.put_f32_le(self.yawspeed);
16588        __tmp.put_i32_le(self.lat);
16589        __tmp.put_i32_le(self.lon);
16590        __tmp.put_i32_le(self.alt);
16591        __tmp.put_i16_le(self.vx);
16592        __tmp.put_i16_le(self.vy);
16593        __tmp.put_i16_le(self.vz);
16594        __tmp.put_i16_le(self.xacc);
16595        __tmp.put_i16_le(self.yacc);
16596        __tmp.put_i16_le(self.zacc);
16597        if matches!(version, MavlinkVersion::V2) {
16598            let len = __tmp.len();
16599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16600        } else {
16601            __tmp.len()
16602        }
16603    }
16604}
16605#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16606#[doc = ""]
16607#[doc = "ID: 115"]
16608#[derive(Debug, Clone, PartialEq)]
16609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16611#[cfg_attr(feature = "ts", derive(TS))]
16612#[cfg_attr(feature = "ts", ts(export))]
16613pub struct HIL_STATE_QUATERNION_DATA {
16614    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16615    pub time_usec: u64,
16616    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16619    pub attitude_quaternion: [f32; 4],
16620    #[doc = "Body frame roll / phi angular speed"]
16621    pub rollspeed: f32,
16622    #[doc = "Body frame pitch / theta angular speed"]
16623    pub pitchspeed: f32,
16624    #[doc = "Body frame yaw / psi angular speed"]
16625    pub yawspeed: f32,
16626    #[doc = "Latitude"]
16627    pub lat: i32,
16628    #[doc = "Longitude"]
16629    pub lon: i32,
16630    #[doc = "Altitude"]
16631    pub alt: i32,
16632    #[doc = "Ground X Speed (Latitude)"]
16633    pub vx: i16,
16634    #[doc = "Ground Y Speed (Longitude)"]
16635    pub vy: i16,
16636    #[doc = "Ground Z Speed (Altitude)"]
16637    pub vz: i16,
16638    #[doc = "Indicated airspeed"]
16639    pub ind_airspeed: u16,
16640    #[doc = "True airspeed"]
16641    pub true_airspeed: u16,
16642    #[doc = "X acceleration"]
16643    pub xacc: i16,
16644    #[doc = "Y acceleration"]
16645    pub yacc: i16,
16646    #[doc = "Z acceleration"]
16647    pub zacc: i16,
16648}
16649impl HIL_STATE_QUATERNION_DATA {
16650    pub const ENCODED_LEN: usize = 64usize;
16651    pub const DEFAULT: Self = Self {
16652        time_usec: 0_u64,
16653        attitude_quaternion: [0.0_f32; 4usize],
16654        rollspeed: 0.0_f32,
16655        pitchspeed: 0.0_f32,
16656        yawspeed: 0.0_f32,
16657        lat: 0_i32,
16658        lon: 0_i32,
16659        alt: 0_i32,
16660        vx: 0_i16,
16661        vy: 0_i16,
16662        vz: 0_i16,
16663        ind_airspeed: 0_u16,
16664        true_airspeed: 0_u16,
16665        xacc: 0_i16,
16666        yacc: 0_i16,
16667        zacc: 0_i16,
16668    };
16669    #[cfg(feature = "arbitrary")]
16670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16671        use arbitrary::{Arbitrary, Unstructured};
16672        let mut buf = [0u8; 1024];
16673        rng.fill_bytes(&mut buf);
16674        let mut unstructured = Unstructured::new(&buf);
16675        Self::arbitrary(&mut unstructured).unwrap_or_default()
16676    }
16677}
16678impl Default for HIL_STATE_QUATERNION_DATA {
16679    fn default() -> Self {
16680        Self::DEFAULT.clone()
16681    }
16682}
16683impl MessageData for HIL_STATE_QUATERNION_DATA {
16684    type Message = MavMessage;
16685    const ID: u32 = 115u32;
16686    const NAME: &'static str = "HIL_STATE_QUATERNION";
16687    const EXTRA_CRC: u8 = 4u8;
16688    const ENCODED_LEN: usize = 64usize;
16689    fn deser(
16690        _version: MavlinkVersion,
16691        __input: &[u8],
16692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16693        let avail_len = __input.len();
16694        let mut payload_buf = [0; Self::ENCODED_LEN];
16695        let mut buf = if avail_len < Self::ENCODED_LEN {
16696            payload_buf[0..avail_len].copy_from_slice(__input);
16697            Bytes::new(&payload_buf)
16698        } else {
16699            Bytes::new(__input)
16700        };
16701        let mut __struct = Self::default();
16702        __struct.time_usec = buf.get_u64_le();
16703        for v in &mut __struct.attitude_quaternion {
16704            let val = buf.get_f32_le();
16705            *v = val;
16706        }
16707        __struct.rollspeed = buf.get_f32_le();
16708        __struct.pitchspeed = buf.get_f32_le();
16709        __struct.yawspeed = buf.get_f32_le();
16710        __struct.lat = buf.get_i32_le();
16711        __struct.lon = buf.get_i32_le();
16712        __struct.alt = buf.get_i32_le();
16713        __struct.vx = buf.get_i16_le();
16714        __struct.vy = buf.get_i16_le();
16715        __struct.vz = buf.get_i16_le();
16716        __struct.ind_airspeed = buf.get_u16_le();
16717        __struct.true_airspeed = buf.get_u16_le();
16718        __struct.xacc = buf.get_i16_le();
16719        __struct.yacc = buf.get_i16_le();
16720        __struct.zacc = buf.get_i16_le();
16721        Ok(__struct)
16722    }
16723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16724        let mut __tmp = BytesMut::new(bytes);
16725        #[allow(clippy::absurd_extreme_comparisons)]
16726        #[allow(unused_comparisons)]
16727        if __tmp.remaining() < Self::ENCODED_LEN {
16728            panic!(
16729                "buffer is too small (need {} bytes, but got {})",
16730                Self::ENCODED_LEN,
16731                __tmp.remaining(),
16732            )
16733        }
16734        __tmp.put_u64_le(self.time_usec);
16735        for val in &self.attitude_quaternion {
16736            __tmp.put_f32_le(*val);
16737        }
16738        __tmp.put_f32_le(self.rollspeed);
16739        __tmp.put_f32_le(self.pitchspeed);
16740        __tmp.put_f32_le(self.yawspeed);
16741        __tmp.put_i32_le(self.lat);
16742        __tmp.put_i32_le(self.lon);
16743        __tmp.put_i32_le(self.alt);
16744        __tmp.put_i16_le(self.vx);
16745        __tmp.put_i16_le(self.vy);
16746        __tmp.put_i16_le(self.vz);
16747        __tmp.put_u16_le(self.ind_airspeed);
16748        __tmp.put_u16_le(self.true_airspeed);
16749        __tmp.put_i16_le(self.xacc);
16750        __tmp.put_i16_le(self.yacc);
16751        __tmp.put_i16_le(self.zacc);
16752        if matches!(version, MavlinkVersion::V2) {
16753            let len = __tmp.len();
16754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16755        } else {
16756            __tmp.len()
16757        }
16758    }
16759}
16760#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16761#[doc = ""]
16762#[doc = "ID: 242"]
16763#[derive(Debug, Clone, PartialEq)]
16764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16766#[cfg_attr(feature = "ts", derive(TS))]
16767#[cfg_attr(feature = "ts", ts(export))]
16768pub struct HOME_POSITION_DATA {
16769    #[doc = "Latitude (WGS84)"]
16770    pub latitude: i32,
16771    #[doc = "Longitude (WGS84)"]
16772    pub longitude: i32,
16773    #[doc = "Altitude (MSL). Positive for up."]
16774    pub altitude: i32,
16775    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16776    pub x: f32,
16777    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16778    pub y: f32,
16779    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16780    pub z: f32,
16781    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16782    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16783    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16784    pub q: [f32; 4],
16785    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16786    pub approach_x: f32,
16787    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16788    pub approach_y: f32,
16789    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16790    pub approach_z: f32,
16791    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16793    pub time_usec: u64,
16794}
16795impl HOME_POSITION_DATA {
16796    pub const ENCODED_LEN: usize = 60usize;
16797    pub const DEFAULT: Self = Self {
16798        latitude: 0_i32,
16799        longitude: 0_i32,
16800        altitude: 0_i32,
16801        x: 0.0_f32,
16802        y: 0.0_f32,
16803        z: 0.0_f32,
16804        q: [0.0_f32; 4usize],
16805        approach_x: 0.0_f32,
16806        approach_y: 0.0_f32,
16807        approach_z: 0.0_f32,
16808        time_usec: 0_u64,
16809    };
16810    #[cfg(feature = "arbitrary")]
16811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16812        use arbitrary::{Arbitrary, Unstructured};
16813        let mut buf = [0u8; 1024];
16814        rng.fill_bytes(&mut buf);
16815        let mut unstructured = Unstructured::new(&buf);
16816        Self::arbitrary(&mut unstructured).unwrap_or_default()
16817    }
16818}
16819impl Default for HOME_POSITION_DATA {
16820    fn default() -> Self {
16821        Self::DEFAULT.clone()
16822    }
16823}
16824impl MessageData for HOME_POSITION_DATA {
16825    type Message = MavMessage;
16826    const ID: u32 = 242u32;
16827    const NAME: &'static str = "HOME_POSITION";
16828    const EXTRA_CRC: u8 = 104u8;
16829    const ENCODED_LEN: usize = 60usize;
16830    fn deser(
16831        _version: MavlinkVersion,
16832        __input: &[u8],
16833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16834        let avail_len = __input.len();
16835        let mut payload_buf = [0; Self::ENCODED_LEN];
16836        let mut buf = if avail_len < Self::ENCODED_LEN {
16837            payload_buf[0..avail_len].copy_from_slice(__input);
16838            Bytes::new(&payload_buf)
16839        } else {
16840            Bytes::new(__input)
16841        };
16842        let mut __struct = Self::default();
16843        __struct.latitude = buf.get_i32_le();
16844        __struct.longitude = buf.get_i32_le();
16845        __struct.altitude = buf.get_i32_le();
16846        __struct.x = buf.get_f32_le();
16847        __struct.y = buf.get_f32_le();
16848        __struct.z = buf.get_f32_le();
16849        for v in &mut __struct.q {
16850            let val = buf.get_f32_le();
16851            *v = val;
16852        }
16853        __struct.approach_x = buf.get_f32_le();
16854        __struct.approach_y = buf.get_f32_le();
16855        __struct.approach_z = buf.get_f32_le();
16856        __struct.time_usec = buf.get_u64_le();
16857        Ok(__struct)
16858    }
16859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16860        let mut __tmp = BytesMut::new(bytes);
16861        #[allow(clippy::absurd_extreme_comparisons)]
16862        #[allow(unused_comparisons)]
16863        if __tmp.remaining() < Self::ENCODED_LEN {
16864            panic!(
16865                "buffer is too small (need {} bytes, but got {})",
16866                Self::ENCODED_LEN,
16867                __tmp.remaining(),
16868            )
16869        }
16870        __tmp.put_i32_le(self.latitude);
16871        __tmp.put_i32_le(self.longitude);
16872        __tmp.put_i32_le(self.altitude);
16873        __tmp.put_f32_le(self.x);
16874        __tmp.put_f32_le(self.y);
16875        __tmp.put_f32_le(self.z);
16876        for val in &self.q {
16877            __tmp.put_f32_le(*val);
16878        }
16879        __tmp.put_f32_le(self.approach_x);
16880        __tmp.put_f32_le(self.approach_y);
16881        __tmp.put_f32_le(self.approach_z);
16882        if matches!(version, MavlinkVersion::V2) {
16883            __tmp.put_u64_le(self.time_usec);
16884            let len = __tmp.len();
16885            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16886        } else {
16887            __tmp.len()
16888        }
16889    }
16890}
16891#[doc = "Temperature and humidity from hygrometer."]
16892#[doc = ""]
16893#[doc = "ID: 12920"]
16894#[derive(Debug, Clone, PartialEq)]
16895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16897#[cfg_attr(feature = "ts", derive(TS))]
16898#[cfg_attr(feature = "ts", ts(export))]
16899pub struct HYGROMETER_SENSOR_DATA {
16900    #[doc = "Temperature"]
16901    pub temperature: i16,
16902    #[doc = "Humidity"]
16903    pub humidity: u16,
16904    #[doc = "Hygrometer ID"]
16905    pub id: u8,
16906}
16907impl HYGROMETER_SENSOR_DATA {
16908    pub const ENCODED_LEN: usize = 5usize;
16909    pub const DEFAULT: Self = Self {
16910        temperature: 0_i16,
16911        humidity: 0_u16,
16912        id: 0_u8,
16913    };
16914    #[cfg(feature = "arbitrary")]
16915    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16916        use arbitrary::{Arbitrary, Unstructured};
16917        let mut buf = [0u8; 1024];
16918        rng.fill_bytes(&mut buf);
16919        let mut unstructured = Unstructured::new(&buf);
16920        Self::arbitrary(&mut unstructured).unwrap_or_default()
16921    }
16922}
16923impl Default for HYGROMETER_SENSOR_DATA {
16924    fn default() -> Self {
16925        Self::DEFAULT.clone()
16926    }
16927}
16928impl MessageData for HYGROMETER_SENSOR_DATA {
16929    type Message = MavMessage;
16930    const ID: u32 = 12920u32;
16931    const NAME: &'static str = "HYGROMETER_SENSOR";
16932    const EXTRA_CRC: u8 = 20u8;
16933    const ENCODED_LEN: usize = 5usize;
16934    fn deser(
16935        _version: MavlinkVersion,
16936        __input: &[u8],
16937    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16938        let avail_len = __input.len();
16939        let mut payload_buf = [0; Self::ENCODED_LEN];
16940        let mut buf = if avail_len < Self::ENCODED_LEN {
16941            payload_buf[0..avail_len].copy_from_slice(__input);
16942            Bytes::new(&payload_buf)
16943        } else {
16944            Bytes::new(__input)
16945        };
16946        let mut __struct = Self::default();
16947        __struct.temperature = buf.get_i16_le();
16948        __struct.humidity = buf.get_u16_le();
16949        __struct.id = buf.get_u8();
16950        Ok(__struct)
16951    }
16952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16953        let mut __tmp = BytesMut::new(bytes);
16954        #[allow(clippy::absurd_extreme_comparisons)]
16955        #[allow(unused_comparisons)]
16956        if __tmp.remaining() < Self::ENCODED_LEN {
16957            panic!(
16958                "buffer is too small (need {} bytes, but got {})",
16959                Self::ENCODED_LEN,
16960                __tmp.remaining(),
16961            )
16962        }
16963        __tmp.put_i16_le(self.temperature);
16964        __tmp.put_u16_le(self.humidity);
16965        __tmp.put_u8(self.id);
16966        if matches!(version, MavlinkVersion::V2) {
16967            let len = __tmp.len();
16968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16969        } else {
16970            __tmp.len()
16971        }
16972    }
16973}
16974#[doc = "Illuminator status."]
16975#[doc = ""]
16976#[doc = "ID: 440"]
16977#[derive(Debug, Clone, PartialEq)]
16978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16980#[cfg_attr(feature = "ts", derive(TS))]
16981#[cfg_attr(feature = "ts", ts(export))]
16982pub struct ILLUMINATOR_STATUS_DATA {
16983    #[doc = "Time since the start-up of the illuminator in ms"]
16984    pub uptime_ms: u32,
16985    #[doc = "Errors"]
16986    pub error_status: IlluminatorErrorFlags,
16987    #[doc = "Illuminator brightness"]
16988    pub brightness: f32,
16989    #[doc = "Illuminator strobing period in seconds"]
16990    pub strobe_period: f32,
16991    #[doc = "Illuminator strobing duty cycle"]
16992    pub strobe_duty_cycle: f32,
16993    #[doc = "Temperature in Celsius"]
16994    pub temp_c: f32,
16995    #[doc = "Minimum strobing period in seconds"]
16996    pub min_strobe_period: f32,
16997    #[doc = "Maximum strobing period in seconds"]
16998    pub max_strobe_period: f32,
16999    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17000    pub enable: u8,
17001    #[doc = "Supported illuminator modes"]
17002    pub mode_bitmask: IlluminatorMode,
17003    #[doc = "Illuminator mode"]
17004    pub mode: IlluminatorMode,
17005}
17006impl ILLUMINATOR_STATUS_DATA {
17007    pub const ENCODED_LEN: usize = 35usize;
17008    pub const DEFAULT: Self = Self {
17009        uptime_ms: 0_u32,
17010        error_status: IlluminatorErrorFlags::DEFAULT,
17011        brightness: 0.0_f32,
17012        strobe_period: 0.0_f32,
17013        strobe_duty_cycle: 0.0_f32,
17014        temp_c: 0.0_f32,
17015        min_strobe_period: 0.0_f32,
17016        max_strobe_period: 0.0_f32,
17017        enable: 0_u8,
17018        mode_bitmask: IlluminatorMode::DEFAULT,
17019        mode: IlluminatorMode::DEFAULT,
17020    };
17021    #[cfg(feature = "arbitrary")]
17022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17023        use arbitrary::{Arbitrary, Unstructured};
17024        let mut buf = [0u8; 1024];
17025        rng.fill_bytes(&mut buf);
17026        let mut unstructured = Unstructured::new(&buf);
17027        Self::arbitrary(&mut unstructured).unwrap_or_default()
17028    }
17029}
17030impl Default for ILLUMINATOR_STATUS_DATA {
17031    fn default() -> Self {
17032        Self::DEFAULT.clone()
17033    }
17034}
17035impl MessageData for ILLUMINATOR_STATUS_DATA {
17036    type Message = MavMessage;
17037    const ID: u32 = 440u32;
17038    const NAME: &'static str = "ILLUMINATOR_STATUS";
17039    const EXTRA_CRC: u8 = 66u8;
17040    const ENCODED_LEN: usize = 35usize;
17041    fn deser(
17042        _version: MavlinkVersion,
17043        __input: &[u8],
17044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17045        let avail_len = __input.len();
17046        let mut payload_buf = [0; Self::ENCODED_LEN];
17047        let mut buf = if avail_len < Self::ENCODED_LEN {
17048            payload_buf[0..avail_len].copy_from_slice(__input);
17049            Bytes::new(&payload_buf)
17050        } else {
17051            Bytes::new(__input)
17052        };
17053        let mut __struct = Self::default();
17054        __struct.uptime_ms = buf.get_u32_le();
17055        let tmp = buf.get_u32_le();
17056        __struct.error_status = IlluminatorErrorFlags::from_bits(
17057            tmp & IlluminatorErrorFlags::all().bits(),
17058        )
17059        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17060            flag_type: "IlluminatorErrorFlags",
17061            value: tmp as u32,
17062        })?;
17063        __struct.brightness = buf.get_f32_le();
17064        __struct.strobe_period = buf.get_f32_le();
17065        __struct.strobe_duty_cycle = buf.get_f32_le();
17066        __struct.temp_c = buf.get_f32_le();
17067        __struct.min_strobe_period = buf.get_f32_le();
17068        __struct.max_strobe_period = buf.get_f32_le();
17069        __struct.enable = buf.get_u8();
17070        let tmp = buf.get_u8();
17071        __struct.mode_bitmask =
17072            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17073                enum_type: "IlluminatorMode",
17074                value: tmp as u32,
17075            })?;
17076        let tmp = buf.get_u8();
17077        __struct.mode =
17078            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17079                enum_type: "IlluminatorMode",
17080                value: tmp as u32,
17081            })?;
17082        Ok(__struct)
17083    }
17084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17085        let mut __tmp = BytesMut::new(bytes);
17086        #[allow(clippy::absurd_extreme_comparisons)]
17087        #[allow(unused_comparisons)]
17088        if __tmp.remaining() < Self::ENCODED_LEN {
17089            panic!(
17090                "buffer is too small (need {} bytes, but got {})",
17091                Self::ENCODED_LEN,
17092                __tmp.remaining(),
17093            )
17094        }
17095        __tmp.put_u32_le(self.uptime_ms);
17096        __tmp.put_u32_le(self.error_status.bits());
17097        __tmp.put_f32_le(self.brightness);
17098        __tmp.put_f32_le(self.strobe_period);
17099        __tmp.put_f32_le(self.strobe_duty_cycle);
17100        __tmp.put_f32_le(self.temp_c);
17101        __tmp.put_f32_le(self.min_strobe_period);
17102        __tmp.put_f32_le(self.max_strobe_period);
17103        __tmp.put_u8(self.enable);
17104        __tmp.put_u8(self.mode_bitmask as u8);
17105        __tmp.put_u8(self.mode as u8);
17106        if matches!(version, MavlinkVersion::V2) {
17107            let len = __tmp.len();
17108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17109        } else {
17110            __tmp.len()
17111        }
17112    }
17113}
17114#[doc = "Status of the Iridium SBD link."]
17115#[doc = ""]
17116#[doc = "ID: 335"]
17117#[derive(Debug, Clone, PartialEq)]
17118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17120#[cfg_attr(feature = "ts", derive(TS))]
17121#[cfg_attr(feature = "ts", ts(export))]
17122pub struct ISBD_LINK_STATUS_DATA {
17123    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17124    pub timestamp: u64,
17125    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17126    pub last_heartbeat: u64,
17127    #[doc = "Number of failed SBD sessions."]
17128    pub failed_sessions: u16,
17129    #[doc = "Number of successful SBD sessions."]
17130    pub successful_sessions: u16,
17131    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17132    pub signal_quality: u8,
17133    #[doc = "1: Ring call pending, 0: No call pending."]
17134    pub ring_pending: u8,
17135    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17136    pub tx_session_pending: u8,
17137    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17138    pub rx_session_pending: u8,
17139}
17140impl ISBD_LINK_STATUS_DATA {
17141    pub const ENCODED_LEN: usize = 24usize;
17142    pub const DEFAULT: Self = Self {
17143        timestamp: 0_u64,
17144        last_heartbeat: 0_u64,
17145        failed_sessions: 0_u16,
17146        successful_sessions: 0_u16,
17147        signal_quality: 0_u8,
17148        ring_pending: 0_u8,
17149        tx_session_pending: 0_u8,
17150        rx_session_pending: 0_u8,
17151    };
17152    #[cfg(feature = "arbitrary")]
17153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17154        use arbitrary::{Arbitrary, Unstructured};
17155        let mut buf = [0u8; 1024];
17156        rng.fill_bytes(&mut buf);
17157        let mut unstructured = Unstructured::new(&buf);
17158        Self::arbitrary(&mut unstructured).unwrap_or_default()
17159    }
17160}
17161impl Default for ISBD_LINK_STATUS_DATA {
17162    fn default() -> Self {
17163        Self::DEFAULT.clone()
17164    }
17165}
17166impl MessageData for ISBD_LINK_STATUS_DATA {
17167    type Message = MavMessage;
17168    const ID: u32 = 335u32;
17169    const NAME: &'static str = "ISBD_LINK_STATUS";
17170    const EXTRA_CRC: u8 = 225u8;
17171    const ENCODED_LEN: usize = 24usize;
17172    fn deser(
17173        _version: MavlinkVersion,
17174        __input: &[u8],
17175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17176        let avail_len = __input.len();
17177        let mut payload_buf = [0; Self::ENCODED_LEN];
17178        let mut buf = if avail_len < Self::ENCODED_LEN {
17179            payload_buf[0..avail_len].copy_from_slice(__input);
17180            Bytes::new(&payload_buf)
17181        } else {
17182            Bytes::new(__input)
17183        };
17184        let mut __struct = Self::default();
17185        __struct.timestamp = buf.get_u64_le();
17186        __struct.last_heartbeat = buf.get_u64_le();
17187        __struct.failed_sessions = buf.get_u16_le();
17188        __struct.successful_sessions = buf.get_u16_le();
17189        __struct.signal_quality = buf.get_u8();
17190        __struct.ring_pending = buf.get_u8();
17191        __struct.tx_session_pending = buf.get_u8();
17192        __struct.rx_session_pending = buf.get_u8();
17193        Ok(__struct)
17194    }
17195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17196        let mut __tmp = BytesMut::new(bytes);
17197        #[allow(clippy::absurd_extreme_comparisons)]
17198        #[allow(unused_comparisons)]
17199        if __tmp.remaining() < Self::ENCODED_LEN {
17200            panic!(
17201                "buffer is too small (need {} bytes, but got {})",
17202                Self::ENCODED_LEN,
17203                __tmp.remaining(),
17204            )
17205        }
17206        __tmp.put_u64_le(self.timestamp);
17207        __tmp.put_u64_le(self.last_heartbeat);
17208        __tmp.put_u16_le(self.failed_sessions);
17209        __tmp.put_u16_le(self.successful_sessions);
17210        __tmp.put_u8(self.signal_quality);
17211        __tmp.put_u8(self.ring_pending);
17212        __tmp.put_u8(self.tx_session_pending);
17213        __tmp.put_u8(self.rx_session_pending);
17214        if matches!(version, MavlinkVersion::V2) {
17215            let len = __tmp.len();
17216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17217        } else {
17218            __tmp.len()
17219        }
17220    }
17221}
17222#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17223#[doc = ""]
17224#[doc = "ID: 149"]
17225#[derive(Debug, Clone, PartialEq)]
17226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17228#[cfg_attr(feature = "ts", derive(TS))]
17229#[cfg_attr(feature = "ts", ts(export))]
17230pub struct LANDING_TARGET_DATA {
17231    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17232    pub time_usec: u64,
17233    #[doc = "X-axis angular offset of the target from the center of the image"]
17234    pub angle_x: f32,
17235    #[doc = "Y-axis angular offset of the target from the center of the image"]
17236    pub angle_y: f32,
17237    #[doc = "Distance to the target from the vehicle"]
17238    pub distance: f32,
17239    #[doc = "Size of target along x-axis"]
17240    pub size_x: f32,
17241    #[doc = "Size of target along y-axis"]
17242    pub size_y: f32,
17243    #[doc = "The ID of the target if multiple targets are present"]
17244    pub target_num: u8,
17245    #[doc = "Coordinate frame used for following fields."]
17246    pub frame: MavFrame,
17247    #[doc = "X Position of the landing target in MAV_FRAME"]
17248    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17249    pub x: f32,
17250    #[doc = "Y Position of the landing target in MAV_FRAME"]
17251    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17252    pub y: f32,
17253    #[doc = "Z Position of the landing target in MAV_FRAME"]
17254    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17255    pub z: f32,
17256    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17257    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17258    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17259    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17260    pub q: [f32; 4],
17261    #[doc = "Type of landing target"]
17262    #[cfg_attr(feature = "serde", serde(default))]
17263    pub mavtype: LandingTargetType,
17264    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17265    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17266    pub position_valid: u8,
17267}
17268impl LANDING_TARGET_DATA {
17269    pub const ENCODED_LEN: usize = 60usize;
17270    pub const DEFAULT: Self = Self {
17271        time_usec: 0_u64,
17272        angle_x: 0.0_f32,
17273        angle_y: 0.0_f32,
17274        distance: 0.0_f32,
17275        size_x: 0.0_f32,
17276        size_y: 0.0_f32,
17277        target_num: 0_u8,
17278        frame: MavFrame::DEFAULT,
17279        x: 0.0_f32,
17280        y: 0.0_f32,
17281        z: 0.0_f32,
17282        q: [0.0_f32; 4usize],
17283        mavtype: LandingTargetType::DEFAULT,
17284        position_valid: 0_u8,
17285    };
17286    #[cfg(feature = "arbitrary")]
17287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17288        use arbitrary::{Arbitrary, Unstructured};
17289        let mut buf = [0u8; 1024];
17290        rng.fill_bytes(&mut buf);
17291        let mut unstructured = Unstructured::new(&buf);
17292        Self::arbitrary(&mut unstructured).unwrap_or_default()
17293    }
17294}
17295impl Default for LANDING_TARGET_DATA {
17296    fn default() -> Self {
17297        Self::DEFAULT.clone()
17298    }
17299}
17300impl MessageData for LANDING_TARGET_DATA {
17301    type Message = MavMessage;
17302    const ID: u32 = 149u32;
17303    const NAME: &'static str = "LANDING_TARGET";
17304    const EXTRA_CRC: u8 = 200u8;
17305    const ENCODED_LEN: usize = 60usize;
17306    fn deser(
17307        _version: MavlinkVersion,
17308        __input: &[u8],
17309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17310        let avail_len = __input.len();
17311        let mut payload_buf = [0; Self::ENCODED_LEN];
17312        let mut buf = if avail_len < Self::ENCODED_LEN {
17313            payload_buf[0..avail_len].copy_from_slice(__input);
17314            Bytes::new(&payload_buf)
17315        } else {
17316            Bytes::new(__input)
17317        };
17318        let mut __struct = Self::default();
17319        __struct.time_usec = buf.get_u64_le();
17320        __struct.angle_x = buf.get_f32_le();
17321        __struct.angle_y = buf.get_f32_le();
17322        __struct.distance = buf.get_f32_le();
17323        __struct.size_x = buf.get_f32_le();
17324        __struct.size_y = buf.get_f32_le();
17325        __struct.target_num = buf.get_u8();
17326        let tmp = buf.get_u8();
17327        __struct.frame =
17328            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17329                enum_type: "MavFrame",
17330                value: tmp as u32,
17331            })?;
17332        __struct.x = buf.get_f32_le();
17333        __struct.y = buf.get_f32_le();
17334        __struct.z = buf.get_f32_le();
17335        for v in &mut __struct.q {
17336            let val = buf.get_f32_le();
17337            *v = val;
17338        }
17339        let tmp = buf.get_u8();
17340        __struct.mavtype =
17341            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17342                enum_type: "LandingTargetType",
17343                value: tmp as u32,
17344            })?;
17345        __struct.position_valid = buf.get_u8();
17346        Ok(__struct)
17347    }
17348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17349        let mut __tmp = BytesMut::new(bytes);
17350        #[allow(clippy::absurd_extreme_comparisons)]
17351        #[allow(unused_comparisons)]
17352        if __tmp.remaining() < Self::ENCODED_LEN {
17353            panic!(
17354                "buffer is too small (need {} bytes, but got {})",
17355                Self::ENCODED_LEN,
17356                __tmp.remaining(),
17357            )
17358        }
17359        __tmp.put_u64_le(self.time_usec);
17360        __tmp.put_f32_le(self.angle_x);
17361        __tmp.put_f32_le(self.angle_y);
17362        __tmp.put_f32_le(self.distance);
17363        __tmp.put_f32_le(self.size_x);
17364        __tmp.put_f32_le(self.size_y);
17365        __tmp.put_u8(self.target_num);
17366        __tmp.put_u8(self.frame as u8);
17367        if matches!(version, MavlinkVersion::V2) {
17368            __tmp.put_f32_le(self.x);
17369            __tmp.put_f32_le(self.y);
17370            __tmp.put_f32_le(self.z);
17371            for val in &self.q {
17372                __tmp.put_f32_le(*val);
17373            }
17374            __tmp.put_u8(self.mavtype as u8);
17375            __tmp.put_u8(self.position_valid);
17376            let len = __tmp.len();
17377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17378        } else {
17379            __tmp.len()
17380        }
17381    }
17382}
17383#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17384#[doc = ""]
17385#[doc = "ID: 8"]
17386#[derive(Debug, Clone, PartialEq)]
17387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17389#[cfg_attr(feature = "ts", derive(TS))]
17390#[cfg_attr(feature = "ts", ts(export))]
17391pub struct LINK_NODE_STATUS_DATA {
17392    #[doc = "Timestamp (time since system boot)."]
17393    pub timestamp: u64,
17394    #[doc = "Transmit rate"]
17395    pub tx_rate: u32,
17396    #[doc = "Receive rate"]
17397    pub rx_rate: u32,
17398    #[doc = "Messages sent"]
17399    pub messages_sent: u32,
17400    #[doc = "Messages received (estimated from counting seq)"]
17401    pub messages_received: u32,
17402    #[doc = "Messages lost (estimated from counting seq)"]
17403    pub messages_lost: u32,
17404    #[doc = "Number of bytes that could not be parsed correctly."]
17405    pub rx_parse_err: u16,
17406    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17407    pub tx_overflows: u16,
17408    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17409    pub rx_overflows: u16,
17410    #[doc = "Remaining free transmit buffer space"]
17411    pub tx_buf: u8,
17412    #[doc = "Remaining free receive buffer space"]
17413    pub rx_buf: u8,
17414}
17415impl LINK_NODE_STATUS_DATA {
17416    pub const ENCODED_LEN: usize = 36usize;
17417    pub const DEFAULT: Self = Self {
17418        timestamp: 0_u64,
17419        tx_rate: 0_u32,
17420        rx_rate: 0_u32,
17421        messages_sent: 0_u32,
17422        messages_received: 0_u32,
17423        messages_lost: 0_u32,
17424        rx_parse_err: 0_u16,
17425        tx_overflows: 0_u16,
17426        rx_overflows: 0_u16,
17427        tx_buf: 0_u8,
17428        rx_buf: 0_u8,
17429    };
17430    #[cfg(feature = "arbitrary")]
17431    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17432        use arbitrary::{Arbitrary, Unstructured};
17433        let mut buf = [0u8; 1024];
17434        rng.fill_bytes(&mut buf);
17435        let mut unstructured = Unstructured::new(&buf);
17436        Self::arbitrary(&mut unstructured).unwrap_or_default()
17437    }
17438}
17439impl Default for LINK_NODE_STATUS_DATA {
17440    fn default() -> Self {
17441        Self::DEFAULT.clone()
17442    }
17443}
17444impl MessageData for LINK_NODE_STATUS_DATA {
17445    type Message = MavMessage;
17446    const ID: u32 = 8u32;
17447    const NAME: &'static str = "LINK_NODE_STATUS";
17448    const EXTRA_CRC: u8 = 117u8;
17449    const ENCODED_LEN: usize = 36usize;
17450    fn deser(
17451        _version: MavlinkVersion,
17452        __input: &[u8],
17453    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17454        let avail_len = __input.len();
17455        let mut payload_buf = [0; Self::ENCODED_LEN];
17456        let mut buf = if avail_len < Self::ENCODED_LEN {
17457            payload_buf[0..avail_len].copy_from_slice(__input);
17458            Bytes::new(&payload_buf)
17459        } else {
17460            Bytes::new(__input)
17461        };
17462        let mut __struct = Self::default();
17463        __struct.timestamp = buf.get_u64_le();
17464        __struct.tx_rate = buf.get_u32_le();
17465        __struct.rx_rate = buf.get_u32_le();
17466        __struct.messages_sent = buf.get_u32_le();
17467        __struct.messages_received = buf.get_u32_le();
17468        __struct.messages_lost = buf.get_u32_le();
17469        __struct.rx_parse_err = buf.get_u16_le();
17470        __struct.tx_overflows = buf.get_u16_le();
17471        __struct.rx_overflows = buf.get_u16_le();
17472        __struct.tx_buf = buf.get_u8();
17473        __struct.rx_buf = buf.get_u8();
17474        Ok(__struct)
17475    }
17476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17477        let mut __tmp = BytesMut::new(bytes);
17478        #[allow(clippy::absurd_extreme_comparisons)]
17479        #[allow(unused_comparisons)]
17480        if __tmp.remaining() < Self::ENCODED_LEN {
17481            panic!(
17482                "buffer is too small (need {} bytes, but got {})",
17483                Self::ENCODED_LEN,
17484                __tmp.remaining(),
17485            )
17486        }
17487        __tmp.put_u64_le(self.timestamp);
17488        __tmp.put_u32_le(self.tx_rate);
17489        __tmp.put_u32_le(self.rx_rate);
17490        __tmp.put_u32_le(self.messages_sent);
17491        __tmp.put_u32_le(self.messages_received);
17492        __tmp.put_u32_le(self.messages_lost);
17493        __tmp.put_u16_le(self.rx_parse_err);
17494        __tmp.put_u16_le(self.tx_overflows);
17495        __tmp.put_u16_le(self.rx_overflows);
17496        __tmp.put_u8(self.tx_buf);
17497        __tmp.put_u8(self.rx_buf);
17498        if matches!(version, MavlinkVersion::V2) {
17499            let len = __tmp.len();
17500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17501        } else {
17502            __tmp.len()
17503        }
17504    }
17505}
17506#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17507#[doc = ""]
17508#[doc = "ID: 32"]
17509#[derive(Debug, Clone, PartialEq)]
17510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17512#[cfg_attr(feature = "ts", derive(TS))]
17513#[cfg_attr(feature = "ts", ts(export))]
17514pub struct LOCAL_POSITION_NED_DATA {
17515    #[doc = "Timestamp (time since system boot)."]
17516    pub time_boot_ms: u32,
17517    #[doc = "X Position"]
17518    pub x: f32,
17519    #[doc = "Y Position"]
17520    pub y: f32,
17521    #[doc = "Z Position"]
17522    pub z: f32,
17523    #[doc = "X Speed"]
17524    pub vx: f32,
17525    #[doc = "Y Speed"]
17526    pub vy: f32,
17527    #[doc = "Z Speed"]
17528    pub vz: f32,
17529}
17530impl LOCAL_POSITION_NED_DATA {
17531    pub const ENCODED_LEN: usize = 28usize;
17532    pub const DEFAULT: Self = Self {
17533        time_boot_ms: 0_u32,
17534        x: 0.0_f32,
17535        y: 0.0_f32,
17536        z: 0.0_f32,
17537        vx: 0.0_f32,
17538        vy: 0.0_f32,
17539        vz: 0.0_f32,
17540    };
17541    #[cfg(feature = "arbitrary")]
17542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17543        use arbitrary::{Arbitrary, Unstructured};
17544        let mut buf = [0u8; 1024];
17545        rng.fill_bytes(&mut buf);
17546        let mut unstructured = Unstructured::new(&buf);
17547        Self::arbitrary(&mut unstructured).unwrap_or_default()
17548    }
17549}
17550impl Default for LOCAL_POSITION_NED_DATA {
17551    fn default() -> Self {
17552        Self::DEFAULT.clone()
17553    }
17554}
17555impl MessageData for LOCAL_POSITION_NED_DATA {
17556    type Message = MavMessage;
17557    const ID: u32 = 32u32;
17558    const NAME: &'static str = "LOCAL_POSITION_NED";
17559    const EXTRA_CRC: u8 = 185u8;
17560    const ENCODED_LEN: usize = 28usize;
17561    fn deser(
17562        _version: MavlinkVersion,
17563        __input: &[u8],
17564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17565        let avail_len = __input.len();
17566        let mut payload_buf = [0; Self::ENCODED_LEN];
17567        let mut buf = if avail_len < Self::ENCODED_LEN {
17568            payload_buf[0..avail_len].copy_from_slice(__input);
17569            Bytes::new(&payload_buf)
17570        } else {
17571            Bytes::new(__input)
17572        };
17573        let mut __struct = Self::default();
17574        __struct.time_boot_ms = buf.get_u32_le();
17575        __struct.x = buf.get_f32_le();
17576        __struct.y = buf.get_f32_le();
17577        __struct.z = buf.get_f32_le();
17578        __struct.vx = buf.get_f32_le();
17579        __struct.vy = buf.get_f32_le();
17580        __struct.vz = buf.get_f32_le();
17581        Ok(__struct)
17582    }
17583    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17584        let mut __tmp = BytesMut::new(bytes);
17585        #[allow(clippy::absurd_extreme_comparisons)]
17586        #[allow(unused_comparisons)]
17587        if __tmp.remaining() < Self::ENCODED_LEN {
17588            panic!(
17589                "buffer is too small (need {} bytes, but got {})",
17590                Self::ENCODED_LEN,
17591                __tmp.remaining(),
17592            )
17593        }
17594        __tmp.put_u32_le(self.time_boot_ms);
17595        __tmp.put_f32_le(self.x);
17596        __tmp.put_f32_le(self.y);
17597        __tmp.put_f32_le(self.z);
17598        __tmp.put_f32_le(self.vx);
17599        __tmp.put_f32_le(self.vy);
17600        __tmp.put_f32_le(self.vz);
17601        if matches!(version, MavlinkVersion::V2) {
17602            let len = __tmp.len();
17603            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17604        } else {
17605            __tmp.len()
17606        }
17607    }
17608}
17609#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17610#[doc = ""]
17611#[doc = "ID: 64"]
17612#[derive(Debug, Clone, PartialEq)]
17613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17615#[cfg_attr(feature = "ts", derive(TS))]
17616#[cfg_attr(feature = "ts", ts(export))]
17617pub struct LOCAL_POSITION_NED_COV_DATA {
17618    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17619    pub time_usec: u64,
17620    #[doc = "X Position"]
17621    pub x: f32,
17622    #[doc = "Y Position"]
17623    pub y: f32,
17624    #[doc = "Z Position"]
17625    pub z: f32,
17626    #[doc = "X Speed"]
17627    pub vx: f32,
17628    #[doc = "Y Speed"]
17629    pub vy: f32,
17630    #[doc = "Z Speed"]
17631    pub vz: f32,
17632    #[doc = "X Acceleration"]
17633    pub ax: f32,
17634    #[doc = "Y Acceleration"]
17635    pub ay: f32,
17636    #[doc = "Z Acceleration"]
17637    pub az: f32,
17638    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17640    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17641    pub covariance: [f32; 45],
17642    #[doc = "Class id of the estimator this estimate originated from."]
17643    pub estimator_type: MavEstimatorType,
17644}
17645impl LOCAL_POSITION_NED_COV_DATA {
17646    pub const ENCODED_LEN: usize = 225usize;
17647    pub const DEFAULT: Self = Self {
17648        time_usec: 0_u64,
17649        x: 0.0_f32,
17650        y: 0.0_f32,
17651        z: 0.0_f32,
17652        vx: 0.0_f32,
17653        vy: 0.0_f32,
17654        vz: 0.0_f32,
17655        ax: 0.0_f32,
17656        ay: 0.0_f32,
17657        az: 0.0_f32,
17658        covariance: [0.0_f32; 45usize],
17659        estimator_type: MavEstimatorType::DEFAULT,
17660    };
17661    #[cfg(feature = "arbitrary")]
17662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17663        use arbitrary::{Arbitrary, Unstructured};
17664        let mut buf = [0u8; 1024];
17665        rng.fill_bytes(&mut buf);
17666        let mut unstructured = Unstructured::new(&buf);
17667        Self::arbitrary(&mut unstructured).unwrap_or_default()
17668    }
17669}
17670impl Default for LOCAL_POSITION_NED_COV_DATA {
17671    fn default() -> Self {
17672        Self::DEFAULT.clone()
17673    }
17674}
17675impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17676    type Message = MavMessage;
17677    const ID: u32 = 64u32;
17678    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17679    const EXTRA_CRC: u8 = 191u8;
17680    const ENCODED_LEN: usize = 225usize;
17681    fn deser(
17682        _version: MavlinkVersion,
17683        __input: &[u8],
17684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17685        let avail_len = __input.len();
17686        let mut payload_buf = [0; Self::ENCODED_LEN];
17687        let mut buf = if avail_len < Self::ENCODED_LEN {
17688            payload_buf[0..avail_len].copy_from_slice(__input);
17689            Bytes::new(&payload_buf)
17690        } else {
17691            Bytes::new(__input)
17692        };
17693        let mut __struct = Self::default();
17694        __struct.time_usec = buf.get_u64_le();
17695        __struct.x = buf.get_f32_le();
17696        __struct.y = buf.get_f32_le();
17697        __struct.z = buf.get_f32_le();
17698        __struct.vx = buf.get_f32_le();
17699        __struct.vy = buf.get_f32_le();
17700        __struct.vz = buf.get_f32_le();
17701        __struct.ax = buf.get_f32_le();
17702        __struct.ay = buf.get_f32_le();
17703        __struct.az = buf.get_f32_le();
17704        for v in &mut __struct.covariance {
17705            let val = buf.get_f32_le();
17706            *v = val;
17707        }
17708        let tmp = buf.get_u8();
17709        __struct.estimator_type =
17710            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17711                enum_type: "MavEstimatorType",
17712                value: tmp as u32,
17713            })?;
17714        Ok(__struct)
17715    }
17716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17717        let mut __tmp = BytesMut::new(bytes);
17718        #[allow(clippy::absurd_extreme_comparisons)]
17719        #[allow(unused_comparisons)]
17720        if __tmp.remaining() < Self::ENCODED_LEN {
17721            panic!(
17722                "buffer is too small (need {} bytes, but got {})",
17723                Self::ENCODED_LEN,
17724                __tmp.remaining(),
17725            )
17726        }
17727        __tmp.put_u64_le(self.time_usec);
17728        __tmp.put_f32_le(self.x);
17729        __tmp.put_f32_le(self.y);
17730        __tmp.put_f32_le(self.z);
17731        __tmp.put_f32_le(self.vx);
17732        __tmp.put_f32_le(self.vy);
17733        __tmp.put_f32_le(self.vz);
17734        __tmp.put_f32_le(self.ax);
17735        __tmp.put_f32_le(self.ay);
17736        __tmp.put_f32_le(self.az);
17737        for val in &self.covariance {
17738            __tmp.put_f32_le(*val);
17739        }
17740        __tmp.put_u8(self.estimator_type as u8);
17741        if matches!(version, MavlinkVersion::V2) {
17742            let len = __tmp.len();
17743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17744        } else {
17745            __tmp.len()
17746        }
17747    }
17748}
17749#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17750#[doc = ""]
17751#[doc = "ID: 89"]
17752#[derive(Debug, Clone, PartialEq)]
17753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17755#[cfg_attr(feature = "ts", derive(TS))]
17756#[cfg_attr(feature = "ts", ts(export))]
17757pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17758    #[doc = "Timestamp (time since system boot)."]
17759    pub time_boot_ms: u32,
17760    #[doc = "X Position"]
17761    pub x: f32,
17762    #[doc = "Y Position"]
17763    pub y: f32,
17764    #[doc = "Z Position"]
17765    pub z: f32,
17766    #[doc = "Roll"]
17767    pub roll: f32,
17768    #[doc = "Pitch"]
17769    pub pitch: f32,
17770    #[doc = "Yaw"]
17771    pub yaw: f32,
17772}
17773impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17774    pub const ENCODED_LEN: usize = 28usize;
17775    pub const DEFAULT: Self = Self {
17776        time_boot_ms: 0_u32,
17777        x: 0.0_f32,
17778        y: 0.0_f32,
17779        z: 0.0_f32,
17780        roll: 0.0_f32,
17781        pitch: 0.0_f32,
17782        yaw: 0.0_f32,
17783    };
17784    #[cfg(feature = "arbitrary")]
17785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17786        use arbitrary::{Arbitrary, Unstructured};
17787        let mut buf = [0u8; 1024];
17788        rng.fill_bytes(&mut buf);
17789        let mut unstructured = Unstructured::new(&buf);
17790        Self::arbitrary(&mut unstructured).unwrap_or_default()
17791    }
17792}
17793impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17794    fn default() -> Self {
17795        Self::DEFAULT.clone()
17796    }
17797}
17798impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17799    type Message = MavMessage;
17800    const ID: u32 = 89u32;
17801    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17802    const EXTRA_CRC: u8 = 231u8;
17803    const ENCODED_LEN: usize = 28usize;
17804    fn deser(
17805        _version: MavlinkVersion,
17806        __input: &[u8],
17807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17808        let avail_len = __input.len();
17809        let mut payload_buf = [0; Self::ENCODED_LEN];
17810        let mut buf = if avail_len < Self::ENCODED_LEN {
17811            payload_buf[0..avail_len].copy_from_slice(__input);
17812            Bytes::new(&payload_buf)
17813        } else {
17814            Bytes::new(__input)
17815        };
17816        let mut __struct = Self::default();
17817        __struct.time_boot_ms = buf.get_u32_le();
17818        __struct.x = buf.get_f32_le();
17819        __struct.y = buf.get_f32_le();
17820        __struct.z = buf.get_f32_le();
17821        __struct.roll = buf.get_f32_le();
17822        __struct.pitch = buf.get_f32_le();
17823        __struct.yaw = buf.get_f32_le();
17824        Ok(__struct)
17825    }
17826    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17827        let mut __tmp = BytesMut::new(bytes);
17828        #[allow(clippy::absurd_extreme_comparisons)]
17829        #[allow(unused_comparisons)]
17830        if __tmp.remaining() < Self::ENCODED_LEN {
17831            panic!(
17832                "buffer is too small (need {} bytes, but got {})",
17833                Self::ENCODED_LEN,
17834                __tmp.remaining(),
17835            )
17836        }
17837        __tmp.put_u32_le(self.time_boot_ms);
17838        __tmp.put_f32_le(self.x);
17839        __tmp.put_f32_le(self.y);
17840        __tmp.put_f32_le(self.z);
17841        __tmp.put_f32_le(self.roll);
17842        __tmp.put_f32_le(self.pitch);
17843        __tmp.put_f32_le(self.yaw);
17844        if matches!(version, MavlinkVersion::V2) {
17845            let len = __tmp.len();
17846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17847        } else {
17848            __tmp.len()
17849        }
17850    }
17851}
17852#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17853#[doc = ""]
17854#[doc = "ID: 268"]
17855#[derive(Debug, Clone, PartialEq)]
17856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17858#[cfg_attr(feature = "ts", derive(TS))]
17859#[cfg_attr(feature = "ts", ts(export))]
17860pub struct LOGGING_ACK_DATA {
17861    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17862    pub sequence: u16,
17863    #[doc = "system ID of the target"]
17864    pub target_system: u8,
17865    #[doc = "component ID of the target"]
17866    pub target_component: u8,
17867}
17868impl LOGGING_ACK_DATA {
17869    pub const ENCODED_LEN: usize = 4usize;
17870    pub const DEFAULT: Self = Self {
17871        sequence: 0_u16,
17872        target_system: 0_u8,
17873        target_component: 0_u8,
17874    };
17875    #[cfg(feature = "arbitrary")]
17876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17877        use arbitrary::{Arbitrary, Unstructured};
17878        let mut buf = [0u8; 1024];
17879        rng.fill_bytes(&mut buf);
17880        let mut unstructured = Unstructured::new(&buf);
17881        Self::arbitrary(&mut unstructured).unwrap_or_default()
17882    }
17883}
17884impl Default for LOGGING_ACK_DATA {
17885    fn default() -> Self {
17886        Self::DEFAULT.clone()
17887    }
17888}
17889impl MessageData for LOGGING_ACK_DATA {
17890    type Message = MavMessage;
17891    const ID: u32 = 268u32;
17892    const NAME: &'static str = "LOGGING_ACK";
17893    const EXTRA_CRC: u8 = 14u8;
17894    const ENCODED_LEN: usize = 4usize;
17895    fn deser(
17896        _version: MavlinkVersion,
17897        __input: &[u8],
17898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17899        let avail_len = __input.len();
17900        let mut payload_buf = [0; Self::ENCODED_LEN];
17901        let mut buf = if avail_len < Self::ENCODED_LEN {
17902            payload_buf[0..avail_len].copy_from_slice(__input);
17903            Bytes::new(&payload_buf)
17904        } else {
17905            Bytes::new(__input)
17906        };
17907        let mut __struct = Self::default();
17908        __struct.sequence = buf.get_u16_le();
17909        __struct.target_system = buf.get_u8();
17910        __struct.target_component = buf.get_u8();
17911        Ok(__struct)
17912    }
17913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17914        let mut __tmp = BytesMut::new(bytes);
17915        #[allow(clippy::absurd_extreme_comparisons)]
17916        #[allow(unused_comparisons)]
17917        if __tmp.remaining() < Self::ENCODED_LEN {
17918            panic!(
17919                "buffer is too small (need {} bytes, but got {})",
17920                Self::ENCODED_LEN,
17921                __tmp.remaining(),
17922            )
17923        }
17924        __tmp.put_u16_le(self.sequence);
17925        __tmp.put_u8(self.target_system);
17926        __tmp.put_u8(self.target_component);
17927        if matches!(version, MavlinkVersion::V2) {
17928            let len = __tmp.len();
17929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17930        } else {
17931            __tmp.len()
17932        }
17933    }
17934}
17935#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17936#[doc = ""]
17937#[doc = "ID: 266"]
17938#[derive(Debug, Clone, PartialEq)]
17939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17941#[cfg_attr(feature = "ts", derive(TS))]
17942#[cfg_attr(feature = "ts", ts(export))]
17943pub struct LOGGING_DATA_DATA {
17944    #[doc = "sequence number (can wrap)"]
17945    pub sequence: u16,
17946    #[doc = "system ID of the target"]
17947    pub target_system: u8,
17948    #[doc = "component ID of the target"]
17949    pub target_component: u8,
17950    #[doc = "data length"]
17951    pub length: u8,
17952    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17953    pub first_message_offset: u8,
17954    #[doc = "logged data"]
17955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17957    pub data: [u8; 249],
17958}
17959impl LOGGING_DATA_DATA {
17960    pub const ENCODED_LEN: usize = 255usize;
17961    pub const DEFAULT: Self = Self {
17962        sequence: 0_u16,
17963        target_system: 0_u8,
17964        target_component: 0_u8,
17965        length: 0_u8,
17966        first_message_offset: 0_u8,
17967        data: [0_u8; 249usize],
17968    };
17969    #[cfg(feature = "arbitrary")]
17970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17971        use arbitrary::{Arbitrary, Unstructured};
17972        let mut buf = [0u8; 1024];
17973        rng.fill_bytes(&mut buf);
17974        let mut unstructured = Unstructured::new(&buf);
17975        Self::arbitrary(&mut unstructured).unwrap_or_default()
17976    }
17977}
17978impl Default for LOGGING_DATA_DATA {
17979    fn default() -> Self {
17980        Self::DEFAULT.clone()
17981    }
17982}
17983impl MessageData for LOGGING_DATA_DATA {
17984    type Message = MavMessage;
17985    const ID: u32 = 266u32;
17986    const NAME: &'static str = "LOGGING_DATA";
17987    const EXTRA_CRC: u8 = 193u8;
17988    const ENCODED_LEN: usize = 255usize;
17989    fn deser(
17990        _version: MavlinkVersion,
17991        __input: &[u8],
17992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17993        let avail_len = __input.len();
17994        let mut payload_buf = [0; Self::ENCODED_LEN];
17995        let mut buf = if avail_len < Self::ENCODED_LEN {
17996            payload_buf[0..avail_len].copy_from_slice(__input);
17997            Bytes::new(&payload_buf)
17998        } else {
17999            Bytes::new(__input)
18000        };
18001        let mut __struct = Self::default();
18002        __struct.sequence = buf.get_u16_le();
18003        __struct.target_system = buf.get_u8();
18004        __struct.target_component = buf.get_u8();
18005        __struct.length = buf.get_u8();
18006        __struct.first_message_offset = buf.get_u8();
18007        for v in &mut __struct.data {
18008            let val = buf.get_u8();
18009            *v = val;
18010        }
18011        Ok(__struct)
18012    }
18013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18014        let mut __tmp = BytesMut::new(bytes);
18015        #[allow(clippy::absurd_extreme_comparisons)]
18016        #[allow(unused_comparisons)]
18017        if __tmp.remaining() < Self::ENCODED_LEN {
18018            panic!(
18019                "buffer is too small (need {} bytes, but got {})",
18020                Self::ENCODED_LEN,
18021                __tmp.remaining(),
18022            )
18023        }
18024        __tmp.put_u16_le(self.sequence);
18025        __tmp.put_u8(self.target_system);
18026        __tmp.put_u8(self.target_component);
18027        __tmp.put_u8(self.length);
18028        __tmp.put_u8(self.first_message_offset);
18029        for val in &self.data {
18030            __tmp.put_u8(*val);
18031        }
18032        if matches!(version, MavlinkVersion::V2) {
18033            let len = __tmp.len();
18034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18035        } else {
18036            __tmp.len()
18037        }
18038    }
18039}
18040#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18041#[doc = ""]
18042#[doc = "ID: 267"]
18043#[derive(Debug, Clone, PartialEq)]
18044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18046#[cfg_attr(feature = "ts", derive(TS))]
18047#[cfg_attr(feature = "ts", ts(export))]
18048pub struct LOGGING_DATA_ACKED_DATA {
18049    #[doc = "sequence number (can wrap)"]
18050    pub sequence: u16,
18051    #[doc = "system ID of the target"]
18052    pub target_system: u8,
18053    #[doc = "component ID of the target"]
18054    pub target_component: u8,
18055    #[doc = "data length"]
18056    pub length: u8,
18057    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18058    pub first_message_offset: u8,
18059    #[doc = "logged data"]
18060    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18061    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18062    pub data: [u8; 249],
18063}
18064impl LOGGING_DATA_ACKED_DATA {
18065    pub const ENCODED_LEN: usize = 255usize;
18066    pub const DEFAULT: Self = Self {
18067        sequence: 0_u16,
18068        target_system: 0_u8,
18069        target_component: 0_u8,
18070        length: 0_u8,
18071        first_message_offset: 0_u8,
18072        data: [0_u8; 249usize],
18073    };
18074    #[cfg(feature = "arbitrary")]
18075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18076        use arbitrary::{Arbitrary, Unstructured};
18077        let mut buf = [0u8; 1024];
18078        rng.fill_bytes(&mut buf);
18079        let mut unstructured = Unstructured::new(&buf);
18080        Self::arbitrary(&mut unstructured).unwrap_or_default()
18081    }
18082}
18083impl Default for LOGGING_DATA_ACKED_DATA {
18084    fn default() -> Self {
18085        Self::DEFAULT.clone()
18086    }
18087}
18088impl MessageData for LOGGING_DATA_ACKED_DATA {
18089    type Message = MavMessage;
18090    const ID: u32 = 267u32;
18091    const NAME: &'static str = "LOGGING_DATA_ACKED";
18092    const EXTRA_CRC: u8 = 35u8;
18093    const ENCODED_LEN: usize = 255usize;
18094    fn deser(
18095        _version: MavlinkVersion,
18096        __input: &[u8],
18097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18098        let avail_len = __input.len();
18099        let mut payload_buf = [0; Self::ENCODED_LEN];
18100        let mut buf = if avail_len < Self::ENCODED_LEN {
18101            payload_buf[0..avail_len].copy_from_slice(__input);
18102            Bytes::new(&payload_buf)
18103        } else {
18104            Bytes::new(__input)
18105        };
18106        let mut __struct = Self::default();
18107        __struct.sequence = buf.get_u16_le();
18108        __struct.target_system = buf.get_u8();
18109        __struct.target_component = buf.get_u8();
18110        __struct.length = buf.get_u8();
18111        __struct.first_message_offset = buf.get_u8();
18112        for v in &mut __struct.data {
18113            let val = buf.get_u8();
18114            *v = val;
18115        }
18116        Ok(__struct)
18117    }
18118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18119        let mut __tmp = BytesMut::new(bytes);
18120        #[allow(clippy::absurd_extreme_comparisons)]
18121        #[allow(unused_comparisons)]
18122        if __tmp.remaining() < Self::ENCODED_LEN {
18123            panic!(
18124                "buffer is too small (need {} bytes, but got {})",
18125                Self::ENCODED_LEN,
18126                __tmp.remaining(),
18127            )
18128        }
18129        __tmp.put_u16_le(self.sequence);
18130        __tmp.put_u8(self.target_system);
18131        __tmp.put_u8(self.target_component);
18132        __tmp.put_u8(self.length);
18133        __tmp.put_u8(self.first_message_offset);
18134        for val in &self.data {
18135            __tmp.put_u8(*val);
18136        }
18137        if matches!(version, MavlinkVersion::V2) {
18138            let len = __tmp.len();
18139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18140        } else {
18141            __tmp.len()
18142        }
18143    }
18144}
18145#[doc = "Reply to LOG_REQUEST_DATA."]
18146#[doc = ""]
18147#[doc = "ID: 120"]
18148#[derive(Debug, Clone, PartialEq)]
18149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18151#[cfg_attr(feature = "ts", derive(TS))]
18152#[cfg_attr(feature = "ts", ts(export))]
18153pub struct LOG_DATA_DATA {
18154    #[doc = "Offset into the log"]
18155    pub ofs: u32,
18156    #[doc = "Log id (from LOG_ENTRY reply)"]
18157    pub id: u16,
18158    #[doc = "Number of bytes (zero for end of log)"]
18159    pub count: u8,
18160    #[doc = "log data"]
18161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18163    pub data: [u8; 90],
18164}
18165impl LOG_DATA_DATA {
18166    pub const ENCODED_LEN: usize = 97usize;
18167    pub const DEFAULT: Self = Self {
18168        ofs: 0_u32,
18169        id: 0_u16,
18170        count: 0_u8,
18171        data: [0_u8; 90usize],
18172    };
18173    #[cfg(feature = "arbitrary")]
18174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18175        use arbitrary::{Arbitrary, Unstructured};
18176        let mut buf = [0u8; 1024];
18177        rng.fill_bytes(&mut buf);
18178        let mut unstructured = Unstructured::new(&buf);
18179        Self::arbitrary(&mut unstructured).unwrap_or_default()
18180    }
18181}
18182impl Default for LOG_DATA_DATA {
18183    fn default() -> Self {
18184        Self::DEFAULT.clone()
18185    }
18186}
18187impl MessageData for LOG_DATA_DATA {
18188    type Message = MavMessage;
18189    const ID: u32 = 120u32;
18190    const NAME: &'static str = "LOG_DATA";
18191    const EXTRA_CRC: u8 = 134u8;
18192    const ENCODED_LEN: usize = 97usize;
18193    fn deser(
18194        _version: MavlinkVersion,
18195        __input: &[u8],
18196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18197        let avail_len = __input.len();
18198        let mut payload_buf = [0; Self::ENCODED_LEN];
18199        let mut buf = if avail_len < Self::ENCODED_LEN {
18200            payload_buf[0..avail_len].copy_from_slice(__input);
18201            Bytes::new(&payload_buf)
18202        } else {
18203            Bytes::new(__input)
18204        };
18205        let mut __struct = Self::default();
18206        __struct.ofs = buf.get_u32_le();
18207        __struct.id = buf.get_u16_le();
18208        __struct.count = buf.get_u8();
18209        for v in &mut __struct.data {
18210            let val = buf.get_u8();
18211            *v = val;
18212        }
18213        Ok(__struct)
18214    }
18215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18216        let mut __tmp = BytesMut::new(bytes);
18217        #[allow(clippy::absurd_extreme_comparisons)]
18218        #[allow(unused_comparisons)]
18219        if __tmp.remaining() < Self::ENCODED_LEN {
18220            panic!(
18221                "buffer is too small (need {} bytes, but got {})",
18222                Self::ENCODED_LEN,
18223                __tmp.remaining(),
18224            )
18225        }
18226        __tmp.put_u32_le(self.ofs);
18227        __tmp.put_u16_le(self.id);
18228        __tmp.put_u8(self.count);
18229        for val in &self.data {
18230            __tmp.put_u8(*val);
18231        }
18232        if matches!(version, MavlinkVersion::V2) {
18233            let len = __tmp.len();
18234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18235        } else {
18236            __tmp.len()
18237        }
18238    }
18239}
18240#[doc = "Reply to LOG_REQUEST_LIST."]
18241#[doc = ""]
18242#[doc = "ID: 118"]
18243#[derive(Debug, Clone, PartialEq)]
18244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18246#[cfg_attr(feature = "ts", derive(TS))]
18247#[cfg_attr(feature = "ts", ts(export))]
18248pub struct LOG_ENTRY_DATA {
18249    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18250    pub time_utc: u32,
18251    #[doc = "Size of the log (may be approximate)"]
18252    pub size: u32,
18253    #[doc = "Log id"]
18254    pub id: u16,
18255    #[doc = "Total number of logs"]
18256    pub num_logs: u16,
18257    #[doc = "High log number"]
18258    pub last_log_num: u16,
18259}
18260impl LOG_ENTRY_DATA {
18261    pub const ENCODED_LEN: usize = 14usize;
18262    pub const DEFAULT: Self = Self {
18263        time_utc: 0_u32,
18264        size: 0_u32,
18265        id: 0_u16,
18266        num_logs: 0_u16,
18267        last_log_num: 0_u16,
18268    };
18269    #[cfg(feature = "arbitrary")]
18270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18271        use arbitrary::{Arbitrary, Unstructured};
18272        let mut buf = [0u8; 1024];
18273        rng.fill_bytes(&mut buf);
18274        let mut unstructured = Unstructured::new(&buf);
18275        Self::arbitrary(&mut unstructured).unwrap_or_default()
18276    }
18277}
18278impl Default for LOG_ENTRY_DATA {
18279    fn default() -> Self {
18280        Self::DEFAULT.clone()
18281    }
18282}
18283impl MessageData for LOG_ENTRY_DATA {
18284    type Message = MavMessage;
18285    const ID: u32 = 118u32;
18286    const NAME: &'static str = "LOG_ENTRY";
18287    const EXTRA_CRC: u8 = 56u8;
18288    const ENCODED_LEN: usize = 14usize;
18289    fn deser(
18290        _version: MavlinkVersion,
18291        __input: &[u8],
18292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18293        let avail_len = __input.len();
18294        let mut payload_buf = [0; Self::ENCODED_LEN];
18295        let mut buf = if avail_len < Self::ENCODED_LEN {
18296            payload_buf[0..avail_len].copy_from_slice(__input);
18297            Bytes::new(&payload_buf)
18298        } else {
18299            Bytes::new(__input)
18300        };
18301        let mut __struct = Self::default();
18302        __struct.time_utc = buf.get_u32_le();
18303        __struct.size = buf.get_u32_le();
18304        __struct.id = buf.get_u16_le();
18305        __struct.num_logs = buf.get_u16_le();
18306        __struct.last_log_num = buf.get_u16_le();
18307        Ok(__struct)
18308    }
18309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18310        let mut __tmp = BytesMut::new(bytes);
18311        #[allow(clippy::absurd_extreme_comparisons)]
18312        #[allow(unused_comparisons)]
18313        if __tmp.remaining() < Self::ENCODED_LEN {
18314            panic!(
18315                "buffer is too small (need {} bytes, but got {})",
18316                Self::ENCODED_LEN,
18317                __tmp.remaining(),
18318            )
18319        }
18320        __tmp.put_u32_le(self.time_utc);
18321        __tmp.put_u32_le(self.size);
18322        __tmp.put_u16_le(self.id);
18323        __tmp.put_u16_le(self.num_logs);
18324        __tmp.put_u16_le(self.last_log_num);
18325        if matches!(version, MavlinkVersion::V2) {
18326            let len = __tmp.len();
18327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18328        } else {
18329            __tmp.len()
18330        }
18331    }
18332}
18333#[doc = "Erase all logs."]
18334#[doc = ""]
18335#[doc = "ID: 121"]
18336#[derive(Debug, Clone, PartialEq)]
18337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18339#[cfg_attr(feature = "ts", derive(TS))]
18340#[cfg_attr(feature = "ts", ts(export))]
18341pub struct LOG_ERASE_DATA {
18342    #[doc = "System ID"]
18343    pub target_system: u8,
18344    #[doc = "Component ID"]
18345    pub target_component: u8,
18346}
18347impl LOG_ERASE_DATA {
18348    pub const ENCODED_LEN: usize = 2usize;
18349    pub const DEFAULT: Self = Self {
18350        target_system: 0_u8,
18351        target_component: 0_u8,
18352    };
18353    #[cfg(feature = "arbitrary")]
18354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18355        use arbitrary::{Arbitrary, Unstructured};
18356        let mut buf = [0u8; 1024];
18357        rng.fill_bytes(&mut buf);
18358        let mut unstructured = Unstructured::new(&buf);
18359        Self::arbitrary(&mut unstructured).unwrap_or_default()
18360    }
18361}
18362impl Default for LOG_ERASE_DATA {
18363    fn default() -> Self {
18364        Self::DEFAULT.clone()
18365    }
18366}
18367impl MessageData for LOG_ERASE_DATA {
18368    type Message = MavMessage;
18369    const ID: u32 = 121u32;
18370    const NAME: &'static str = "LOG_ERASE";
18371    const EXTRA_CRC: u8 = 237u8;
18372    const ENCODED_LEN: usize = 2usize;
18373    fn deser(
18374        _version: MavlinkVersion,
18375        __input: &[u8],
18376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18377        let avail_len = __input.len();
18378        let mut payload_buf = [0; Self::ENCODED_LEN];
18379        let mut buf = if avail_len < Self::ENCODED_LEN {
18380            payload_buf[0..avail_len].copy_from_slice(__input);
18381            Bytes::new(&payload_buf)
18382        } else {
18383            Bytes::new(__input)
18384        };
18385        let mut __struct = Self::default();
18386        __struct.target_system = buf.get_u8();
18387        __struct.target_component = buf.get_u8();
18388        Ok(__struct)
18389    }
18390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18391        let mut __tmp = BytesMut::new(bytes);
18392        #[allow(clippy::absurd_extreme_comparisons)]
18393        #[allow(unused_comparisons)]
18394        if __tmp.remaining() < Self::ENCODED_LEN {
18395            panic!(
18396                "buffer is too small (need {} bytes, but got {})",
18397                Self::ENCODED_LEN,
18398                __tmp.remaining(),
18399            )
18400        }
18401        __tmp.put_u8(self.target_system);
18402        __tmp.put_u8(self.target_component);
18403        if matches!(version, MavlinkVersion::V2) {
18404            let len = __tmp.len();
18405            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18406        } else {
18407            __tmp.len()
18408        }
18409    }
18410}
18411#[doc = "Request a chunk of a log."]
18412#[doc = ""]
18413#[doc = "ID: 119"]
18414#[derive(Debug, Clone, PartialEq)]
18415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18417#[cfg_attr(feature = "ts", derive(TS))]
18418#[cfg_attr(feature = "ts", ts(export))]
18419pub struct LOG_REQUEST_DATA_DATA {
18420    #[doc = "Offset into the log"]
18421    pub ofs: u32,
18422    #[doc = "Number of bytes"]
18423    pub count: u32,
18424    #[doc = "Log id (from LOG_ENTRY reply)"]
18425    pub id: u16,
18426    #[doc = "System ID"]
18427    pub target_system: u8,
18428    #[doc = "Component ID"]
18429    pub target_component: u8,
18430}
18431impl LOG_REQUEST_DATA_DATA {
18432    pub const ENCODED_LEN: usize = 12usize;
18433    pub const DEFAULT: Self = Self {
18434        ofs: 0_u32,
18435        count: 0_u32,
18436        id: 0_u16,
18437        target_system: 0_u8,
18438        target_component: 0_u8,
18439    };
18440    #[cfg(feature = "arbitrary")]
18441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18442        use arbitrary::{Arbitrary, Unstructured};
18443        let mut buf = [0u8; 1024];
18444        rng.fill_bytes(&mut buf);
18445        let mut unstructured = Unstructured::new(&buf);
18446        Self::arbitrary(&mut unstructured).unwrap_or_default()
18447    }
18448}
18449impl Default for LOG_REQUEST_DATA_DATA {
18450    fn default() -> Self {
18451        Self::DEFAULT.clone()
18452    }
18453}
18454impl MessageData for LOG_REQUEST_DATA_DATA {
18455    type Message = MavMessage;
18456    const ID: u32 = 119u32;
18457    const NAME: &'static str = "LOG_REQUEST_DATA";
18458    const EXTRA_CRC: u8 = 116u8;
18459    const ENCODED_LEN: usize = 12usize;
18460    fn deser(
18461        _version: MavlinkVersion,
18462        __input: &[u8],
18463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18464        let avail_len = __input.len();
18465        let mut payload_buf = [0; Self::ENCODED_LEN];
18466        let mut buf = if avail_len < Self::ENCODED_LEN {
18467            payload_buf[0..avail_len].copy_from_slice(__input);
18468            Bytes::new(&payload_buf)
18469        } else {
18470            Bytes::new(__input)
18471        };
18472        let mut __struct = Self::default();
18473        __struct.ofs = buf.get_u32_le();
18474        __struct.count = buf.get_u32_le();
18475        __struct.id = buf.get_u16_le();
18476        __struct.target_system = buf.get_u8();
18477        __struct.target_component = buf.get_u8();
18478        Ok(__struct)
18479    }
18480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18481        let mut __tmp = BytesMut::new(bytes);
18482        #[allow(clippy::absurd_extreme_comparisons)]
18483        #[allow(unused_comparisons)]
18484        if __tmp.remaining() < Self::ENCODED_LEN {
18485            panic!(
18486                "buffer is too small (need {} bytes, but got {})",
18487                Self::ENCODED_LEN,
18488                __tmp.remaining(),
18489            )
18490        }
18491        __tmp.put_u32_le(self.ofs);
18492        __tmp.put_u32_le(self.count);
18493        __tmp.put_u16_le(self.id);
18494        __tmp.put_u8(self.target_system);
18495        __tmp.put_u8(self.target_component);
18496        if matches!(version, MavlinkVersion::V2) {
18497            let len = __tmp.len();
18498            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18499        } else {
18500            __tmp.len()
18501        }
18502    }
18503}
18504#[doc = "Stop log transfer and resume normal logging."]
18505#[doc = ""]
18506#[doc = "ID: 122"]
18507#[derive(Debug, Clone, PartialEq)]
18508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18510#[cfg_attr(feature = "ts", derive(TS))]
18511#[cfg_attr(feature = "ts", ts(export))]
18512pub struct LOG_REQUEST_END_DATA {
18513    #[doc = "System ID"]
18514    pub target_system: u8,
18515    #[doc = "Component ID"]
18516    pub target_component: u8,
18517}
18518impl LOG_REQUEST_END_DATA {
18519    pub const ENCODED_LEN: usize = 2usize;
18520    pub const DEFAULT: Self = Self {
18521        target_system: 0_u8,
18522        target_component: 0_u8,
18523    };
18524    #[cfg(feature = "arbitrary")]
18525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18526        use arbitrary::{Arbitrary, Unstructured};
18527        let mut buf = [0u8; 1024];
18528        rng.fill_bytes(&mut buf);
18529        let mut unstructured = Unstructured::new(&buf);
18530        Self::arbitrary(&mut unstructured).unwrap_or_default()
18531    }
18532}
18533impl Default for LOG_REQUEST_END_DATA {
18534    fn default() -> Self {
18535        Self::DEFAULT.clone()
18536    }
18537}
18538impl MessageData for LOG_REQUEST_END_DATA {
18539    type Message = MavMessage;
18540    const ID: u32 = 122u32;
18541    const NAME: &'static str = "LOG_REQUEST_END";
18542    const EXTRA_CRC: u8 = 203u8;
18543    const ENCODED_LEN: usize = 2usize;
18544    fn deser(
18545        _version: MavlinkVersion,
18546        __input: &[u8],
18547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18548        let avail_len = __input.len();
18549        let mut payload_buf = [0; Self::ENCODED_LEN];
18550        let mut buf = if avail_len < Self::ENCODED_LEN {
18551            payload_buf[0..avail_len].copy_from_slice(__input);
18552            Bytes::new(&payload_buf)
18553        } else {
18554            Bytes::new(__input)
18555        };
18556        let mut __struct = Self::default();
18557        __struct.target_system = buf.get_u8();
18558        __struct.target_component = buf.get_u8();
18559        Ok(__struct)
18560    }
18561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18562        let mut __tmp = BytesMut::new(bytes);
18563        #[allow(clippy::absurd_extreme_comparisons)]
18564        #[allow(unused_comparisons)]
18565        if __tmp.remaining() < Self::ENCODED_LEN {
18566            panic!(
18567                "buffer is too small (need {} bytes, but got {})",
18568                Self::ENCODED_LEN,
18569                __tmp.remaining(),
18570            )
18571        }
18572        __tmp.put_u8(self.target_system);
18573        __tmp.put_u8(self.target_component);
18574        if matches!(version, MavlinkVersion::V2) {
18575            let len = __tmp.len();
18576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18577        } else {
18578            __tmp.len()
18579        }
18580    }
18581}
18582#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18583#[doc = ""]
18584#[doc = "ID: 117"]
18585#[derive(Debug, Clone, PartialEq)]
18586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18588#[cfg_attr(feature = "ts", derive(TS))]
18589#[cfg_attr(feature = "ts", ts(export))]
18590pub struct LOG_REQUEST_LIST_DATA {
18591    #[doc = "First log id (0 for first available)"]
18592    pub start: u16,
18593    #[doc = "Last log id (0xffff for last available)"]
18594    pub end: u16,
18595    #[doc = "System ID"]
18596    pub target_system: u8,
18597    #[doc = "Component ID"]
18598    pub target_component: u8,
18599}
18600impl LOG_REQUEST_LIST_DATA {
18601    pub const ENCODED_LEN: usize = 6usize;
18602    pub const DEFAULT: Self = Self {
18603        start: 0_u16,
18604        end: 0_u16,
18605        target_system: 0_u8,
18606        target_component: 0_u8,
18607    };
18608    #[cfg(feature = "arbitrary")]
18609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18610        use arbitrary::{Arbitrary, Unstructured};
18611        let mut buf = [0u8; 1024];
18612        rng.fill_bytes(&mut buf);
18613        let mut unstructured = Unstructured::new(&buf);
18614        Self::arbitrary(&mut unstructured).unwrap_or_default()
18615    }
18616}
18617impl Default for LOG_REQUEST_LIST_DATA {
18618    fn default() -> Self {
18619        Self::DEFAULT.clone()
18620    }
18621}
18622impl MessageData for LOG_REQUEST_LIST_DATA {
18623    type Message = MavMessage;
18624    const ID: u32 = 117u32;
18625    const NAME: &'static str = "LOG_REQUEST_LIST";
18626    const EXTRA_CRC: u8 = 128u8;
18627    const ENCODED_LEN: usize = 6usize;
18628    fn deser(
18629        _version: MavlinkVersion,
18630        __input: &[u8],
18631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18632        let avail_len = __input.len();
18633        let mut payload_buf = [0; Self::ENCODED_LEN];
18634        let mut buf = if avail_len < Self::ENCODED_LEN {
18635            payload_buf[0..avail_len].copy_from_slice(__input);
18636            Bytes::new(&payload_buf)
18637        } else {
18638            Bytes::new(__input)
18639        };
18640        let mut __struct = Self::default();
18641        __struct.start = buf.get_u16_le();
18642        __struct.end = buf.get_u16_le();
18643        __struct.target_system = buf.get_u8();
18644        __struct.target_component = buf.get_u8();
18645        Ok(__struct)
18646    }
18647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18648        let mut __tmp = BytesMut::new(bytes);
18649        #[allow(clippy::absurd_extreme_comparisons)]
18650        #[allow(unused_comparisons)]
18651        if __tmp.remaining() < Self::ENCODED_LEN {
18652            panic!(
18653                "buffer is too small (need {} bytes, but got {})",
18654                Self::ENCODED_LEN,
18655                __tmp.remaining(),
18656            )
18657        }
18658        __tmp.put_u16_le(self.start);
18659        __tmp.put_u16_le(self.end);
18660        __tmp.put_u8(self.target_system);
18661        __tmp.put_u8(self.target_component);
18662        if matches!(version, MavlinkVersion::V2) {
18663            let len = __tmp.len();
18664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18665        } else {
18666            __tmp.len()
18667        }
18668    }
18669}
18670#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18671#[doc = ""]
18672#[doc = "ID: 192"]
18673#[derive(Debug, Clone, PartialEq)]
18674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18676#[cfg_attr(feature = "ts", derive(TS))]
18677#[cfg_attr(feature = "ts", ts(export))]
18678pub struct MAG_CAL_REPORT_DATA {
18679    #[doc = "RMS milligauss residuals."]
18680    pub fitness: f32,
18681    #[doc = "X offset."]
18682    pub ofs_x: f32,
18683    #[doc = "Y offset."]
18684    pub ofs_y: f32,
18685    #[doc = "Z offset."]
18686    pub ofs_z: f32,
18687    #[doc = "X diagonal (matrix 11)."]
18688    pub diag_x: f32,
18689    #[doc = "Y diagonal (matrix 22)."]
18690    pub diag_y: f32,
18691    #[doc = "Z diagonal (matrix 33)."]
18692    pub diag_z: f32,
18693    #[doc = "X off-diagonal (matrix 12 and 21)."]
18694    pub offdiag_x: f32,
18695    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18696    pub offdiag_y: f32,
18697    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18698    pub offdiag_z: f32,
18699    #[doc = "Compass being calibrated."]
18700    pub compass_id: u8,
18701    #[doc = "Bitmask of compasses being calibrated."]
18702    pub cal_mask: u8,
18703    #[doc = "Calibration Status."]
18704    pub cal_status: MagCalStatus,
18705    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18706    pub autosaved: u8,
18707    #[doc = "Confidence in orientation (higher is better)."]
18708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18709    pub orientation_confidence: f32,
18710    #[doc = "orientation before calibration."]
18711    #[cfg_attr(feature = "serde", serde(default))]
18712    pub old_orientation: MavSensorOrientation,
18713    #[doc = "orientation after calibration."]
18714    #[cfg_attr(feature = "serde", serde(default))]
18715    pub new_orientation: MavSensorOrientation,
18716    #[doc = "field radius correction factor"]
18717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18718    pub scale_factor: f32,
18719}
18720impl MAG_CAL_REPORT_DATA {
18721    pub const ENCODED_LEN: usize = 54usize;
18722    pub const DEFAULT: Self = Self {
18723        fitness: 0.0_f32,
18724        ofs_x: 0.0_f32,
18725        ofs_y: 0.0_f32,
18726        ofs_z: 0.0_f32,
18727        diag_x: 0.0_f32,
18728        diag_y: 0.0_f32,
18729        diag_z: 0.0_f32,
18730        offdiag_x: 0.0_f32,
18731        offdiag_y: 0.0_f32,
18732        offdiag_z: 0.0_f32,
18733        compass_id: 0_u8,
18734        cal_mask: 0_u8,
18735        cal_status: MagCalStatus::DEFAULT,
18736        autosaved: 0_u8,
18737        orientation_confidence: 0.0_f32,
18738        old_orientation: MavSensorOrientation::DEFAULT,
18739        new_orientation: MavSensorOrientation::DEFAULT,
18740        scale_factor: 0.0_f32,
18741    };
18742    #[cfg(feature = "arbitrary")]
18743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18744        use arbitrary::{Arbitrary, Unstructured};
18745        let mut buf = [0u8; 1024];
18746        rng.fill_bytes(&mut buf);
18747        let mut unstructured = Unstructured::new(&buf);
18748        Self::arbitrary(&mut unstructured).unwrap_or_default()
18749    }
18750}
18751impl Default for MAG_CAL_REPORT_DATA {
18752    fn default() -> Self {
18753        Self::DEFAULT.clone()
18754    }
18755}
18756impl MessageData for MAG_CAL_REPORT_DATA {
18757    type Message = MavMessage;
18758    const ID: u32 = 192u32;
18759    const NAME: &'static str = "MAG_CAL_REPORT";
18760    const EXTRA_CRC: u8 = 36u8;
18761    const ENCODED_LEN: usize = 54usize;
18762    fn deser(
18763        _version: MavlinkVersion,
18764        __input: &[u8],
18765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18766        let avail_len = __input.len();
18767        let mut payload_buf = [0; Self::ENCODED_LEN];
18768        let mut buf = if avail_len < Self::ENCODED_LEN {
18769            payload_buf[0..avail_len].copy_from_slice(__input);
18770            Bytes::new(&payload_buf)
18771        } else {
18772            Bytes::new(__input)
18773        };
18774        let mut __struct = Self::default();
18775        __struct.fitness = buf.get_f32_le();
18776        __struct.ofs_x = buf.get_f32_le();
18777        __struct.ofs_y = buf.get_f32_le();
18778        __struct.ofs_z = buf.get_f32_le();
18779        __struct.diag_x = buf.get_f32_le();
18780        __struct.diag_y = buf.get_f32_le();
18781        __struct.diag_z = buf.get_f32_le();
18782        __struct.offdiag_x = buf.get_f32_le();
18783        __struct.offdiag_y = buf.get_f32_le();
18784        __struct.offdiag_z = buf.get_f32_le();
18785        __struct.compass_id = buf.get_u8();
18786        __struct.cal_mask = buf.get_u8();
18787        let tmp = buf.get_u8();
18788        __struct.cal_status =
18789            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18790                enum_type: "MagCalStatus",
18791                value: tmp as u32,
18792            })?;
18793        __struct.autosaved = buf.get_u8();
18794        __struct.orientation_confidence = buf.get_f32_le();
18795        let tmp = buf.get_u8();
18796        __struct.old_orientation =
18797            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18798                enum_type: "MavSensorOrientation",
18799                value: tmp as u32,
18800            })?;
18801        let tmp = buf.get_u8();
18802        __struct.new_orientation =
18803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18804                enum_type: "MavSensorOrientation",
18805                value: tmp as u32,
18806            })?;
18807        __struct.scale_factor = buf.get_f32_le();
18808        Ok(__struct)
18809    }
18810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18811        let mut __tmp = BytesMut::new(bytes);
18812        #[allow(clippy::absurd_extreme_comparisons)]
18813        #[allow(unused_comparisons)]
18814        if __tmp.remaining() < Self::ENCODED_LEN {
18815            panic!(
18816                "buffer is too small (need {} bytes, but got {})",
18817                Self::ENCODED_LEN,
18818                __tmp.remaining(),
18819            )
18820        }
18821        __tmp.put_f32_le(self.fitness);
18822        __tmp.put_f32_le(self.ofs_x);
18823        __tmp.put_f32_le(self.ofs_y);
18824        __tmp.put_f32_le(self.ofs_z);
18825        __tmp.put_f32_le(self.diag_x);
18826        __tmp.put_f32_le(self.diag_y);
18827        __tmp.put_f32_le(self.diag_z);
18828        __tmp.put_f32_le(self.offdiag_x);
18829        __tmp.put_f32_le(self.offdiag_y);
18830        __tmp.put_f32_le(self.offdiag_z);
18831        __tmp.put_u8(self.compass_id);
18832        __tmp.put_u8(self.cal_mask);
18833        __tmp.put_u8(self.cal_status as u8);
18834        __tmp.put_u8(self.autosaved);
18835        if matches!(version, MavlinkVersion::V2) {
18836            __tmp.put_f32_le(self.orientation_confidence);
18837            __tmp.put_u8(self.old_orientation as u8);
18838            __tmp.put_u8(self.new_orientation as u8);
18839            __tmp.put_f32_le(self.scale_factor);
18840            let len = __tmp.len();
18841            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18842        } else {
18843            __tmp.len()
18844        }
18845    }
18846}
18847#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18848#[doc = ""]
18849#[doc = "ID: 69"]
18850#[derive(Debug, Clone, PartialEq)]
18851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18853#[cfg_attr(feature = "ts", derive(TS))]
18854#[cfg_attr(feature = "ts", ts(export))]
18855pub struct MANUAL_CONTROL_DATA {
18856    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18857    pub x: i16,
18858    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18859    pub y: i16,
18860    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18861    pub z: i16,
18862    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18863    pub r: i16,
18864    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18865    pub buttons: u16,
18866    #[doc = "The system to be controlled."]
18867    pub target: u8,
18868    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18869    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18870    pub buttons2: u16,
18871    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18872    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18873    pub enabled_extensions: u8,
18874    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18875    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18876    pub s: i16,
18877    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18878    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18879    pub t: i16,
18880    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18882    pub aux1: i16,
18883    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18885    pub aux2: i16,
18886    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18887    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18888    pub aux3: i16,
18889    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18891    pub aux4: i16,
18892    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18894    pub aux5: i16,
18895    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18897    pub aux6: i16,
18898}
18899impl MANUAL_CONTROL_DATA {
18900    pub const ENCODED_LEN: usize = 30usize;
18901    pub const DEFAULT: Self = Self {
18902        x: 0_i16,
18903        y: 0_i16,
18904        z: 0_i16,
18905        r: 0_i16,
18906        buttons: 0_u16,
18907        target: 0_u8,
18908        buttons2: 0_u16,
18909        enabled_extensions: 0_u8,
18910        s: 0_i16,
18911        t: 0_i16,
18912        aux1: 0_i16,
18913        aux2: 0_i16,
18914        aux3: 0_i16,
18915        aux4: 0_i16,
18916        aux5: 0_i16,
18917        aux6: 0_i16,
18918    };
18919    #[cfg(feature = "arbitrary")]
18920    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18921        use arbitrary::{Arbitrary, Unstructured};
18922        let mut buf = [0u8; 1024];
18923        rng.fill_bytes(&mut buf);
18924        let mut unstructured = Unstructured::new(&buf);
18925        Self::arbitrary(&mut unstructured).unwrap_or_default()
18926    }
18927}
18928impl Default for MANUAL_CONTROL_DATA {
18929    fn default() -> Self {
18930        Self::DEFAULT.clone()
18931    }
18932}
18933impl MessageData for MANUAL_CONTROL_DATA {
18934    type Message = MavMessage;
18935    const ID: u32 = 69u32;
18936    const NAME: &'static str = "MANUAL_CONTROL";
18937    const EXTRA_CRC: u8 = 243u8;
18938    const ENCODED_LEN: usize = 30usize;
18939    fn deser(
18940        _version: MavlinkVersion,
18941        __input: &[u8],
18942    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18943        let avail_len = __input.len();
18944        let mut payload_buf = [0; Self::ENCODED_LEN];
18945        let mut buf = if avail_len < Self::ENCODED_LEN {
18946            payload_buf[0..avail_len].copy_from_slice(__input);
18947            Bytes::new(&payload_buf)
18948        } else {
18949            Bytes::new(__input)
18950        };
18951        let mut __struct = Self::default();
18952        __struct.x = buf.get_i16_le();
18953        __struct.y = buf.get_i16_le();
18954        __struct.z = buf.get_i16_le();
18955        __struct.r = buf.get_i16_le();
18956        __struct.buttons = buf.get_u16_le();
18957        __struct.target = buf.get_u8();
18958        __struct.buttons2 = buf.get_u16_le();
18959        __struct.enabled_extensions = buf.get_u8();
18960        __struct.s = buf.get_i16_le();
18961        __struct.t = buf.get_i16_le();
18962        __struct.aux1 = buf.get_i16_le();
18963        __struct.aux2 = buf.get_i16_le();
18964        __struct.aux3 = buf.get_i16_le();
18965        __struct.aux4 = buf.get_i16_le();
18966        __struct.aux5 = buf.get_i16_le();
18967        __struct.aux6 = buf.get_i16_le();
18968        Ok(__struct)
18969    }
18970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18971        let mut __tmp = BytesMut::new(bytes);
18972        #[allow(clippy::absurd_extreme_comparisons)]
18973        #[allow(unused_comparisons)]
18974        if __tmp.remaining() < Self::ENCODED_LEN {
18975            panic!(
18976                "buffer is too small (need {} bytes, but got {})",
18977                Self::ENCODED_LEN,
18978                __tmp.remaining(),
18979            )
18980        }
18981        __tmp.put_i16_le(self.x);
18982        __tmp.put_i16_le(self.y);
18983        __tmp.put_i16_le(self.z);
18984        __tmp.put_i16_le(self.r);
18985        __tmp.put_u16_le(self.buttons);
18986        __tmp.put_u8(self.target);
18987        if matches!(version, MavlinkVersion::V2) {
18988            __tmp.put_u16_le(self.buttons2);
18989            __tmp.put_u8(self.enabled_extensions);
18990            __tmp.put_i16_le(self.s);
18991            __tmp.put_i16_le(self.t);
18992            __tmp.put_i16_le(self.aux1);
18993            __tmp.put_i16_le(self.aux2);
18994            __tmp.put_i16_le(self.aux3);
18995            __tmp.put_i16_le(self.aux4);
18996            __tmp.put_i16_le(self.aux5);
18997            __tmp.put_i16_le(self.aux6);
18998            let len = __tmp.len();
18999            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19000        } else {
19001            __tmp.len()
19002        }
19003    }
19004}
19005#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19006#[doc = ""]
19007#[doc = "ID: 81"]
19008#[derive(Debug, Clone, PartialEq)]
19009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19011#[cfg_attr(feature = "ts", derive(TS))]
19012#[cfg_attr(feature = "ts", ts(export))]
19013pub struct MANUAL_SETPOINT_DATA {
19014    #[doc = "Timestamp (time since system boot)."]
19015    pub time_boot_ms: u32,
19016    #[doc = "Desired roll rate"]
19017    pub roll: f32,
19018    #[doc = "Desired pitch rate"]
19019    pub pitch: f32,
19020    #[doc = "Desired yaw rate"]
19021    pub yaw: f32,
19022    #[doc = "Collective thrust, normalized to 0 .. 1"]
19023    pub thrust: f32,
19024    #[doc = "Flight mode switch position, 0.. 255"]
19025    pub mode_switch: u8,
19026    #[doc = "Override mode switch position, 0.. 255"]
19027    pub manual_override_switch: u8,
19028}
19029impl MANUAL_SETPOINT_DATA {
19030    pub const ENCODED_LEN: usize = 22usize;
19031    pub const DEFAULT: Self = Self {
19032        time_boot_ms: 0_u32,
19033        roll: 0.0_f32,
19034        pitch: 0.0_f32,
19035        yaw: 0.0_f32,
19036        thrust: 0.0_f32,
19037        mode_switch: 0_u8,
19038        manual_override_switch: 0_u8,
19039    };
19040    #[cfg(feature = "arbitrary")]
19041    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19042        use arbitrary::{Arbitrary, Unstructured};
19043        let mut buf = [0u8; 1024];
19044        rng.fill_bytes(&mut buf);
19045        let mut unstructured = Unstructured::new(&buf);
19046        Self::arbitrary(&mut unstructured).unwrap_or_default()
19047    }
19048}
19049impl Default for MANUAL_SETPOINT_DATA {
19050    fn default() -> Self {
19051        Self::DEFAULT.clone()
19052    }
19053}
19054impl MessageData for MANUAL_SETPOINT_DATA {
19055    type Message = MavMessage;
19056    const ID: u32 = 81u32;
19057    const NAME: &'static str = "MANUAL_SETPOINT";
19058    const EXTRA_CRC: u8 = 106u8;
19059    const ENCODED_LEN: usize = 22usize;
19060    fn deser(
19061        _version: MavlinkVersion,
19062        __input: &[u8],
19063    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19064        let avail_len = __input.len();
19065        let mut payload_buf = [0; Self::ENCODED_LEN];
19066        let mut buf = if avail_len < Self::ENCODED_LEN {
19067            payload_buf[0..avail_len].copy_from_slice(__input);
19068            Bytes::new(&payload_buf)
19069        } else {
19070            Bytes::new(__input)
19071        };
19072        let mut __struct = Self::default();
19073        __struct.time_boot_ms = buf.get_u32_le();
19074        __struct.roll = buf.get_f32_le();
19075        __struct.pitch = buf.get_f32_le();
19076        __struct.yaw = buf.get_f32_le();
19077        __struct.thrust = buf.get_f32_le();
19078        __struct.mode_switch = buf.get_u8();
19079        __struct.manual_override_switch = buf.get_u8();
19080        Ok(__struct)
19081    }
19082    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19083        let mut __tmp = BytesMut::new(bytes);
19084        #[allow(clippy::absurd_extreme_comparisons)]
19085        #[allow(unused_comparisons)]
19086        if __tmp.remaining() < Self::ENCODED_LEN {
19087            panic!(
19088                "buffer is too small (need {} bytes, but got {})",
19089                Self::ENCODED_LEN,
19090                __tmp.remaining(),
19091            )
19092        }
19093        __tmp.put_u32_le(self.time_boot_ms);
19094        __tmp.put_f32_le(self.roll);
19095        __tmp.put_f32_le(self.pitch);
19096        __tmp.put_f32_le(self.yaw);
19097        __tmp.put_f32_le(self.thrust);
19098        __tmp.put_u8(self.mode_switch);
19099        __tmp.put_u8(self.manual_override_switch);
19100        if matches!(version, MavlinkVersion::V2) {
19101            let len = __tmp.len();
19102            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19103        } else {
19104            __tmp.len()
19105        }
19106    }
19107}
19108#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19109#[doc = ""]
19110#[doc = "ID: 249"]
19111#[derive(Debug, Clone, PartialEq)]
19112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19114#[cfg_attr(feature = "ts", derive(TS))]
19115#[cfg_attr(feature = "ts", ts(export))]
19116pub struct MEMORY_VECT_DATA {
19117    #[doc = "Starting address of the debug variables"]
19118    pub address: u16,
19119    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19120    pub ver: u8,
19121    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19122    pub mavtype: u8,
19123    #[doc = "Memory contents at specified address"]
19124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19125    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19126    pub value: [i8; 32],
19127}
19128impl MEMORY_VECT_DATA {
19129    pub const ENCODED_LEN: usize = 36usize;
19130    pub const DEFAULT: Self = Self {
19131        address: 0_u16,
19132        ver: 0_u8,
19133        mavtype: 0_u8,
19134        value: [0_i8; 32usize],
19135    };
19136    #[cfg(feature = "arbitrary")]
19137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19138        use arbitrary::{Arbitrary, Unstructured};
19139        let mut buf = [0u8; 1024];
19140        rng.fill_bytes(&mut buf);
19141        let mut unstructured = Unstructured::new(&buf);
19142        Self::arbitrary(&mut unstructured).unwrap_or_default()
19143    }
19144}
19145impl Default for MEMORY_VECT_DATA {
19146    fn default() -> Self {
19147        Self::DEFAULT.clone()
19148    }
19149}
19150impl MessageData for MEMORY_VECT_DATA {
19151    type Message = MavMessage;
19152    const ID: u32 = 249u32;
19153    const NAME: &'static str = "MEMORY_VECT";
19154    const EXTRA_CRC: u8 = 204u8;
19155    const ENCODED_LEN: usize = 36usize;
19156    fn deser(
19157        _version: MavlinkVersion,
19158        __input: &[u8],
19159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19160        let avail_len = __input.len();
19161        let mut payload_buf = [0; Self::ENCODED_LEN];
19162        let mut buf = if avail_len < Self::ENCODED_LEN {
19163            payload_buf[0..avail_len].copy_from_slice(__input);
19164            Bytes::new(&payload_buf)
19165        } else {
19166            Bytes::new(__input)
19167        };
19168        let mut __struct = Self::default();
19169        __struct.address = buf.get_u16_le();
19170        __struct.ver = buf.get_u8();
19171        __struct.mavtype = buf.get_u8();
19172        for v in &mut __struct.value {
19173            let val = buf.get_i8();
19174            *v = val;
19175        }
19176        Ok(__struct)
19177    }
19178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19179        let mut __tmp = BytesMut::new(bytes);
19180        #[allow(clippy::absurd_extreme_comparisons)]
19181        #[allow(unused_comparisons)]
19182        if __tmp.remaining() < Self::ENCODED_LEN {
19183            panic!(
19184                "buffer is too small (need {} bytes, but got {})",
19185                Self::ENCODED_LEN,
19186                __tmp.remaining(),
19187            )
19188        }
19189        __tmp.put_u16_le(self.address);
19190        __tmp.put_u8(self.ver);
19191        __tmp.put_u8(self.mavtype);
19192        for val in &self.value {
19193            __tmp.put_i8(*val);
19194        }
19195        if matches!(version, MavlinkVersion::V2) {
19196            let len = __tmp.len();
19197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19198        } else {
19199            __tmp.len()
19200        }
19201    }
19202}
19203#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19204#[doc = ""]
19205#[doc = "ID: 244"]
19206#[derive(Debug, Clone, PartialEq)]
19207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19209#[cfg_attr(feature = "ts", derive(TS))]
19210#[cfg_attr(feature = "ts", ts(export))]
19211pub struct MESSAGE_INTERVAL_DATA {
19212    #[doc = "0 indicates the interval at which it is sent."]
19213    pub interval_us: i32,
19214    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19215    pub message_id: u16,
19216}
19217impl MESSAGE_INTERVAL_DATA {
19218    pub const ENCODED_LEN: usize = 6usize;
19219    pub const DEFAULT: Self = Self {
19220        interval_us: 0_i32,
19221        message_id: 0_u16,
19222    };
19223    #[cfg(feature = "arbitrary")]
19224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19225        use arbitrary::{Arbitrary, Unstructured};
19226        let mut buf = [0u8; 1024];
19227        rng.fill_bytes(&mut buf);
19228        let mut unstructured = Unstructured::new(&buf);
19229        Self::arbitrary(&mut unstructured).unwrap_or_default()
19230    }
19231}
19232impl Default for MESSAGE_INTERVAL_DATA {
19233    fn default() -> Self {
19234        Self::DEFAULT.clone()
19235    }
19236}
19237impl MessageData for MESSAGE_INTERVAL_DATA {
19238    type Message = MavMessage;
19239    const ID: u32 = 244u32;
19240    const NAME: &'static str = "MESSAGE_INTERVAL";
19241    const EXTRA_CRC: u8 = 95u8;
19242    const ENCODED_LEN: usize = 6usize;
19243    fn deser(
19244        _version: MavlinkVersion,
19245        __input: &[u8],
19246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19247        let avail_len = __input.len();
19248        let mut payload_buf = [0; Self::ENCODED_LEN];
19249        let mut buf = if avail_len < Self::ENCODED_LEN {
19250            payload_buf[0..avail_len].copy_from_slice(__input);
19251            Bytes::new(&payload_buf)
19252        } else {
19253            Bytes::new(__input)
19254        };
19255        let mut __struct = Self::default();
19256        __struct.interval_us = buf.get_i32_le();
19257        __struct.message_id = buf.get_u16_le();
19258        Ok(__struct)
19259    }
19260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19261        let mut __tmp = BytesMut::new(bytes);
19262        #[allow(clippy::absurd_extreme_comparisons)]
19263        #[allow(unused_comparisons)]
19264        if __tmp.remaining() < Self::ENCODED_LEN {
19265            panic!(
19266                "buffer is too small (need {} bytes, but got {})",
19267                Self::ENCODED_LEN,
19268                __tmp.remaining(),
19269            )
19270        }
19271        __tmp.put_i32_le(self.interval_us);
19272        __tmp.put_u16_le(self.message_id);
19273        if matches!(version, MavlinkVersion::V2) {
19274            let len = __tmp.len();
19275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19276        } else {
19277            __tmp.len()
19278        }
19279    }
19280}
19281#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19282#[doc = ""]
19283#[doc = "ID: 47"]
19284#[derive(Debug, Clone, PartialEq)]
19285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19287#[cfg_attr(feature = "ts", derive(TS))]
19288#[cfg_attr(feature = "ts", ts(export))]
19289pub struct MISSION_ACK_DATA {
19290    #[doc = "System ID"]
19291    pub target_system: u8,
19292    #[doc = "Component ID"]
19293    pub target_component: u8,
19294    #[doc = "Mission result."]
19295    pub mavtype: MavMissionResult,
19296    #[doc = "Mission type."]
19297    #[cfg_attr(feature = "serde", serde(default))]
19298    pub mission_type: MavMissionType,
19299    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19300    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19301    pub opaque_id: u32,
19302}
19303impl MISSION_ACK_DATA {
19304    pub const ENCODED_LEN: usize = 8usize;
19305    pub const DEFAULT: Self = Self {
19306        target_system: 0_u8,
19307        target_component: 0_u8,
19308        mavtype: MavMissionResult::DEFAULT,
19309        mission_type: MavMissionType::DEFAULT,
19310        opaque_id: 0_u32,
19311    };
19312    #[cfg(feature = "arbitrary")]
19313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19314        use arbitrary::{Arbitrary, Unstructured};
19315        let mut buf = [0u8; 1024];
19316        rng.fill_bytes(&mut buf);
19317        let mut unstructured = Unstructured::new(&buf);
19318        Self::arbitrary(&mut unstructured).unwrap_or_default()
19319    }
19320}
19321impl Default for MISSION_ACK_DATA {
19322    fn default() -> Self {
19323        Self::DEFAULT.clone()
19324    }
19325}
19326impl MessageData for MISSION_ACK_DATA {
19327    type Message = MavMessage;
19328    const ID: u32 = 47u32;
19329    const NAME: &'static str = "MISSION_ACK";
19330    const EXTRA_CRC: u8 = 153u8;
19331    const ENCODED_LEN: usize = 8usize;
19332    fn deser(
19333        _version: MavlinkVersion,
19334        __input: &[u8],
19335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19336        let avail_len = __input.len();
19337        let mut payload_buf = [0; Self::ENCODED_LEN];
19338        let mut buf = if avail_len < Self::ENCODED_LEN {
19339            payload_buf[0..avail_len].copy_from_slice(__input);
19340            Bytes::new(&payload_buf)
19341        } else {
19342            Bytes::new(__input)
19343        };
19344        let mut __struct = Self::default();
19345        __struct.target_system = buf.get_u8();
19346        __struct.target_component = buf.get_u8();
19347        let tmp = buf.get_u8();
19348        __struct.mavtype =
19349            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19350                enum_type: "MavMissionResult",
19351                value: tmp as u32,
19352            })?;
19353        let tmp = buf.get_u8();
19354        __struct.mission_type =
19355            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19356                enum_type: "MavMissionType",
19357                value: tmp as u32,
19358            })?;
19359        __struct.opaque_id = buf.get_u32_le();
19360        Ok(__struct)
19361    }
19362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19363        let mut __tmp = BytesMut::new(bytes);
19364        #[allow(clippy::absurd_extreme_comparisons)]
19365        #[allow(unused_comparisons)]
19366        if __tmp.remaining() < Self::ENCODED_LEN {
19367            panic!(
19368                "buffer is too small (need {} bytes, but got {})",
19369                Self::ENCODED_LEN,
19370                __tmp.remaining(),
19371            )
19372        }
19373        __tmp.put_u8(self.target_system);
19374        __tmp.put_u8(self.target_component);
19375        __tmp.put_u8(self.mavtype as u8);
19376        if matches!(version, MavlinkVersion::V2) {
19377            __tmp.put_u8(self.mission_type as u8);
19378            __tmp.put_u32_le(self.opaque_id);
19379            let len = __tmp.len();
19380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19381        } else {
19382            __tmp.len()
19383        }
19384    }
19385}
19386#[doc = "Delete all mission items at once."]
19387#[doc = ""]
19388#[doc = "ID: 45"]
19389#[derive(Debug, Clone, PartialEq)]
19390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19392#[cfg_attr(feature = "ts", derive(TS))]
19393#[cfg_attr(feature = "ts", ts(export))]
19394pub struct MISSION_CLEAR_ALL_DATA {
19395    #[doc = "System ID"]
19396    pub target_system: u8,
19397    #[doc = "Component ID"]
19398    pub target_component: u8,
19399    #[doc = "Mission type."]
19400    #[cfg_attr(feature = "serde", serde(default))]
19401    pub mission_type: MavMissionType,
19402}
19403impl MISSION_CLEAR_ALL_DATA {
19404    pub const ENCODED_LEN: usize = 3usize;
19405    pub const DEFAULT: Self = Self {
19406        target_system: 0_u8,
19407        target_component: 0_u8,
19408        mission_type: MavMissionType::DEFAULT,
19409    };
19410    #[cfg(feature = "arbitrary")]
19411    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19412        use arbitrary::{Arbitrary, Unstructured};
19413        let mut buf = [0u8; 1024];
19414        rng.fill_bytes(&mut buf);
19415        let mut unstructured = Unstructured::new(&buf);
19416        Self::arbitrary(&mut unstructured).unwrap_or_default()
19417    }
19418}
19419impl Default for MISSION_CLEAR_ALL_DATA {
19420    fn default() -> Self {
19421        Self::DEFAULT.clone()
19422    }
19423}
19424impl MessageData for MISSION_CLEAR_ALL_DATA {
19425    type Message = MavMessage;
19426    const ID: u32 = 45u32;
19427    const NAME: &'static str = "MISSION_CLEAR_ALL";
19428    const EXTRA_CRC: u8 = 232u8;
19429    const ENCODED_LEN: usize = 3usize;
19430    fn deser(
19431        _version: MavlinkVersion,
19432        __input: &[u8],
19433    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19434        let avail_len = __input.len();
19435        let mut payload_buf = [0; Self::ENCODED_LEN];
19436        let mut buf = if avail_len < Self::ENCODED_LEN {
19437            payload_buf[0..avail_len].copy_from_slice(__input);
19438            Bytes::new(&payload_buf)
19439        } else {
19440            Bytes::new(__input)
19441        };
19442        let mut __struct = Self::default();
19443        __struct.target_system = buf.get_u8();
19444        __struct.target_component = buf.get_u8();
19445        let tmp = buf.get_u8();
19446        __struct.mission_type =
19447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19448                enum_type: "MavMissionType",
19449                value: tmp as u32,
19450            })?;
19451        Ok(__struct)
19452    }
19453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19454        let mut __tmp = BytesMut::new(bytes);
19455        #[allow(clippy::absurd_extreme_comparisons)]
19456        #[allow(unused_comparisons)]
19457        if __tmp.remaining() < Self::ENCODED_LEN {
19458            panic!(
19459                "buffer is too small (need {} bytes, but got {})",
19460                Self::ENCODED_LEN,
19461                __tmp.remaining(),
19462            )
19463        }
19464        __tmp.put_u8(self.target_system);
19465        __tmp.put_u8(self.target_component);
19466        if matches!(version, MavlinkVersion::V2) {
19467            __tmp.put_u8(self.mission_type as u8);
19468            let len = __tmp.len();
19469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19470        } else {
19471            __tmp.len()
19472        }
19473    }
19474}
19475#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19476#[doc = ""]
19477#[doc = "ID: 44"]
19478#[derive(Debug, Clone, PartialEq)]
19479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19481#[cfg_attr(feature = "ts", derive(TS))]
19482#[cfg_attr(feature = "ts", ts(export))]
19483pub struct MISSION_COUNT_DATA {
19484    #[doc = "Number of mission items in the sequence"]
19485    pub count: u16,
19486    #[doc = "System ID"]
19487    pub target_system: u8,
19488    #[doc = "Component ID"]
19489    pub target_component: u8,
19490    #[doc = "Mission type."]
19491    #[cfg_attr(feature = "serde", serde(default))]
19492    pub mission_type: MavMissionType,
19493    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19494    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19495    pub opaque_id: u32,
19496}
19497impl MISSION_COUNT_DATA {
19498    pub const ENCODED_LEN: usize = 9usize;
19499    pub const DEFAULT: Self = Self {
19500        count: 0_u16,
19501        target_system: 0_u8,
19502        target_component: 0_u8,
19503        mission_type: MavMissionType::DEFAULT,
19504        opaque_id: 0_u32,
19505    };
19506    #[cfg(feature = "arbitrary")]
19507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19508        use arbitrary::{Arbitrary, Unstructured};
19509        let mut buf = [0u8; 1024];
19510        rng.fill_bytes(&mut buf);
19511        let mut unstructured = Unstructured::new(&buf);
19512        Self::arbitrary(&mut unstructured).unwrap_or_default()
19513    }
19514}
19515impl Default for MISSION_COUNT_DATA {
19516    fn default() -> Self {
19517        Self::DEFAULT.clone()
19518    }
19519}
19520impl MessageData for MISSION_COUNT_DATA {
19521    type Message = MavMessage;
19522    const ID: u32 = 44u32;
19523    const NAME: &'static str = "MISSION_COUNT";
19524    const EXTRA_CRC: u8 = 221u8;
19525    const ENCODED_LEN: usize = 9usize;
19526    fn deser(
19527        _version: MavlinkVersion,
19528        __input: &[u8],
19529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19530        let avail_len = __input.len();
19531        let mut payload_buf = [0; Self::ENCODED_LEN];
19532        let mut buf = if avail_len < Self::ENCODED_LEN {
19533            payload_buf[0..avail_len].copy_from_slice(__input);
19534            Bytes::new(&payload_buf)
19535        } else {
19536            Bytes::new(__input)
19537        };
19538        let mut __struct = Self::default();
19539        __struct.count = buf.get_u16_le();
19540        __struct.target_system = buf.get_u8();
19541        __struct.target_component = buf.get_u8();
19542        let tmp = buf.get_u8();
19543        __struct.mission_type =
19544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19545                enum_type: "MavMissionType",
19546                value: tmp as u32,
19547            })?;
19548        __struct.opaque_id = buf.get_u32_le();
19549        Ok(__struct)
19550    }
19551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19552        let mut __tmp = BytesMut::new(bytes);
19553        #[allow(clippy::absurd_extreme_comparisons)]
19554        #[allow(unused_comparisons)]
19555        if __tmp.remaining() < Self::ENCODED_LEN {
19556            panic!(
19557                "buffer is too small (need {} bytes, but got {})",
19558                Self::ENCODED_LEN,
19559                __tmp.remaining(),
19560            )
19561        }
19562        __tmp.put_u16_le(self.count);
19563        __tmp.put_u8(self.target_system);
19564        __tmp.put_u8(self.target_component);
19565        if matches!(version, MavlinkVersion::V2) {
19566            __tmp.put_u8(self.mission_type as u8);
19567            __tmp.put_u32_le(self.opaque_id);
19568            let len = __tmp.len();
19569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19570        } else {
19571            __tmp.len()
19572        }
19573    }
19574}
19575#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19576#[doc = ""]
19577#[doc = "ID: 42"]
19578#[derive(Debug, Clone, PartialEq)]
19579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19581#[cfg_attr(feature = "ts", derive(TS))]
19582#[cfg_attr(feature = "ts", ts(export))]
19583pub struct MISSION_CURRENT_DATA {
19584    #[doc = "Sequence"]
19585    pub seq: u16,
19586    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19588    pub total: u16,
19589    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19590    #[cfg_attr(feature = "serde", serde(default))]
19591    pub mission_state: MissionState,
19592    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19594    pub mission_mode: u8,
19595    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19596    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19597    pub mission_id: u32,
19598    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19599    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19600    pub fence_id: u32,
19601    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19602    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19603    pub rally_points_id: u32,
19604}
19605impl MISSION_CURRENT_DATA {
19606    pub const ENCODED_LEN: usize = 18usize;
19607    pub const DEFAULT: Self = Self {
19608        seq: 0_u16,
19609        total: 0_u16,
19610        mission_state: MissionState::DEFAULT,
19611        mission_mode: 0_u8,
19612        mission_id: 0_u32,
19613        fence_id: 0_u32,
19614        rally_points_id: 0_u32,
19615    };
19616    #[cfg(feature = "arbitrary")]
19617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19618        use arbitrary::{Arbitrary, Unstructured};
19619        let mut buf = [0u8; 1024];
19620        rng.fill_bytes(&mut buf);
19621        let mut unstructured = Unstructured::new(&buf);
19622        Self::arbitrary(&mut unstructured).unwrap_or_default()
19623    }
19624}
19625impl Default for MISSION_CURRENT_DATA {
19626    fn default() -> Self {
19627        Self::DEFAULT.clone()
19628    }
19629}
19630impl MessageData for MISSION_CURRENT_DATA {
19631    type Message = MavMessage;
19632    const ID: u32 = 42u32;
19633    const NAME: &'static str = "MISSION_CURRENT";
19634    const EXTRA_CRC: u8 = 28u8;
19635    const ENCODED_LEN: usize = 18usize;
19636    fn deser(
19637        _version: MavlinkVersion,
19638        __input: &[u8],
19639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19640        let avail_len = __input.len();
19641        let mut payload_buf = [0; Self::ENCODED_LEN];
19642        let mut buf = if avail_len < Self::ENCODED_LEN {
19643            payload_buf[0..avail_len].copy_from_slice(__input);
19644            Bytes::new(&payload_buf)
19645        } else {
19646            Bytes::new(__input)
19647        };
19648        let mut __struct = Self::default();
19649        __struct.seq = buf.get_u16_le();
19650        __struct.total = buf.get_u16_le();
19651        let tmp = buf.get_u8();
19652        __struct.mission_state =
19653            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19654                enum_type: "MissionState",
19655                value: tmp as u32,
19656            })?;
19657        __struct.mission_mode = buf.get_u8();
19658        __struct.mission_id = buf.get_u32_le();
19659        __struct.fence_id = buf.get_u32_le();
19660        __struct.rally_points_id = buf.get_u32_le();
19661        Ok(__struct)
19662    }
19663    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19664        let mut __tmp = BytesMut::new(bytes);
19665        #[allow(clippy::absurd_extreme_comparisons)]
19666        #[allow(unused_comparisons)]
19667        if __tmp.remaining() < Self::ENCODED_LEN {
19668            panic!(
19669                "buffer is too small (need {} bytes, but got {})",
19670                Self::ENCODED_LEN,
19671                __tmp.remaining(),
19672            )
19673        }
19674        __tmp.put_u16_le(self.seq);
19675        if matches!(version, MavlinkVersion::V2) {
19676            __tmp.put_u16_le(self.total);
19677            __tmp.put_u8(self.mission_state as u8);
19678            __tmp.put_u8(self.mission_mode);
19679            __tmp.put_u32_le(self.mission_id);
19680            __tmp.put_u32_le(self.fence_id);
19681            __tmp.put_u32_le(self.rally_points_id);
19682            let len = __tmp.len();
19683            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19684        } else {
19685            __tmp.len()
19686        }
19687    }
19688}
19689#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19690#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19691#[doc = ""]
19692#[doc = "ID: 39"]
19693#[derive(Debug, Clone, PartialEq)]
19694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19696#[cfg_attr(feature = "ts", derive(TS))]
19697#[cfg_attr(feature = "ts", ts(export))]
19698pub struct MISSION_ITEM_DATA {
19699    #[doc = "PARAM1, see MAV_CMD enum"]
19700    pub param1: f32,
19701    #[doc = "PARAM2, see MAV_CMD enum"]
19702    pub param2: f32,
19703    #[doc = "PARAM3, see MAV_CMD enum"]
19704    pub param3: f32,
19705    #[doc = "PARAM4, see MAV_CMD enum"]
19706    pub param4: f32,
19707    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19708    pub x: f32,
19709    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19710    pub y: f32,
19711    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19712    pub z: f32,
19713    #[doc = "Sequence"]
19714    pub seq: u16,
19715    #[doc = "The scheduled action for the waypoint."]
19716    pub command: MavCmd,
19717    #[doc = "System ID"]
19718    pub target_system: u8,
19719    #[doc = "Component ID"]
19720    pub target_component: u8,
19721    #[doc = "The coordinate system of the waypoint."]
19722    pub frame: MavFrame,
19723    #[doc = "false:0, true:1"]
19724    pub current: u8,
19725    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19726    pub autocontinue: u8,
19727    #[doc = "Mission type."]
19728    #[cfg_attr(feature = "serde", serde(default))]
19729    pub mission_type: MavMissionType,
19730}
19731impl MISSION_ITEM_DATA {
19732    pub const ENCODED_LEN: usize = 38usize;
19733    pub const DEFAULT: Self = Self {
19734        param1: 0.0_f32,
19735        param2: 0.0_f32,
19736        param3: 0.0_f32,
19737        param4: 0.0_f32,
19738        x: 0.0_f32,
19739        y: 0.0_f32,
19740        z: 0.0_f32,
19741        seq: 0_u16,
19742        command: MavCmd::DEFAULT,
19743        target_system: 0_u8,
19744        target_component: 0_u8,
19745        frame: MavFrame::DEFAULT,
19746        current: 0_u8,
19747        autocontinue: 0_u8,
19748        mission_type: MavMissionType::DEFAULT,
19749    };
19750    #[cfg(feature = "arbitrary")]
19751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19752        use arbitrary::{Arbitrary, Unstructured};
19753        let mut buf = [0u8; 1024];
19754        rng.fill_bytes(&mut buf);
19755        let mut unstructured = Unstructured::new(&buf);
19756        Self::arbitrary(&mut unstructured).unwrap_or_default()
19757    }
19758}
19759impl Default for MISSION_ITEM_DATA {
19760    fn default() -> Self {
19761        Self::DEFAULT.clone()
19762    }
19763}
19764impl MessageData for MISSION_ITEM_DATA {
19765    type Message = MavMessage;
19766    const ID: u32 = 39u32;
19767    const NAME: &'static str = "MISSION_ITEM";
19768    const EXTRA_CRC: u8 = 254u8;
19769    const ENCODED_LEN: usize = 38usize;
19770    fn deser(
19771        _version: MavlinkVersion,
19772        __input: &[u8],
19773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19774        let avail_len = __input.len();
19775        let mut payload_buf = [0; Self::ENCODED_LEN];
19776        let mut buf = if avail_len < Self::ENCODED_LEN {
19777            payload_buf[0..avail_len].copy_from_slice(__input);
19778            Bytes::new(&payload_buf)
19779        } else {
19780            Bytes::new(__input)
19781        };
19782        let mut __struct = Self::default();
19783        __struct.param1 = buf.get_f32_le();
19784        __struct.param2 = buf.get_f32_le();
19785        __struct.param3 = buf.get_f32_le();
19786        __struct.param4 = buf.get_f32_le();
19787        __struct.x = buf.get_f32_le();
19788        __struct.y = buf.get_f32_le();
19789        __struct.z = buf.get_f32_le();
19790        __struct.seq = buf.get_u16_le();
19791        let tmp = buf.get_u16_le();
19792        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19793            ::mavlink_core::error::ParserError::InvalidEnum {
19794                enum_type: "MavCmd",
19795                value: tmp as u32,
19796            },
19797        )?;
19798        __struct.target_system = buf.get_u8();
19799        __struct.target_component = buf.get_u8();
19800        let tmp = buf.get_u8();
19801        __struct.frame =
19802            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19803                enum_type: "MavFrame",
19804                value: tmp as u32,
19805            })?;
19806        __struct.current = buf.get_u8();
19807        __struct.autocontinue = buf.get_u8();
19808        let tmp = buf.get_u8();
19809        __struct.mission_type =
19810            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19811                enum_type: "MavMissionType",
19812                value: tmp as u32,
19813            })?;
19814        Ok(__struct)
19815    }
19816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19817        let mut __tmp = BytesMut::new(bytes);
19818        #[allow(clippy::absurd_extreme_comparisons)]
19819        #[allow(unused_comparisons)]
19820        if __tmp.remaining() < Self::ENCODED_LEN {
19821            panic!(
19822                "buffer is too small (need {} bytes, but got {})",
19823                Self::ENCODED_LEN,
19824                __tmp.remaining(),
19825            )
19826        }
19827        __tmp.put_f32_le(self.param1);
19828        __tmp.put_f32_le(self.param2);
19829        __tmp.put_f32_le(self.param3);
19830        __tmp.put_f32_le(self.param4);
19831        __tmp.put_f32_le(self.x);
19832        __tmp.put_f32_le(self.y);
19833        __tmp.put_f32_le(self.z);
19834        __tmp.put_u16_le(self.seq);
19835        __tmp.put_u16_le(self.command as u16);
19836        __tmp.put_u8(self.target_system);
19837        __tmp.put_u8(self.target_component);
19838        __tmp.put_u8(self.frame as u8);
19839        __tmp.put_u8(self.current);
19840        __tmp.put_u8(self.autocontinue);
19841        if matches!(version, MavlinkVersion::V2) {
19842            __tmp.put_u8(self.mission_type as u8);
19843            let len = __tmp.len();
19844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19845        } else {
19846            __tmp.len()
19847        }
19848    }
19849}
19850#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19851#[doc = ""]
19852#[doc = "ID: 73"]
19853#[derive(Debug, Clone, PartialEq)]
19854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19856#[cfg_attr(feature = "ts", derive(TS))]
19857#[cfg_attr(feature = "ts", ts(export))]
19858pub struct MISSION_ITEM_INT_DATA {
19859    #[doc = "PARAM1, see MAV_CMD enum"]
19860    pub param1: f32,
19861    #[doc = "PARAM2, see MAV_CMD enum"]
19862    pub param2: f32,
19863    #[doc = "PARAM3, see MAV_CMD enum"]
19864    pub param3: f32,
19865    #[doc = "PARAM4, see MAV_CMD enum"]
19866    pub param4: f32,
19867    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19868    pub x: i32,
19869    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19870    pub y: i32,
19871    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19872    pub z: f32,
19873    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19874    pub seq: u16,
19875    #[doc = "The scheduled action for the waypoint."]
19876    pub command: MavCmd,
19877    #[doc = "System ID"]
19878    pub target_system: u8,
19879    #[doc = "Component ID"]
19880    pub target_component: u8,
19881    #[doc = "The coordinate system of the waypoint."]
19882    pub frame: MavFrame,
19883    #[doc = "false:0, true:1"]
19884    pub current: u8,
19885    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19886    pub autocontinue: u8,
19887    #[doc = "Mission type."]
19888    #[cfg_attr(feature = "serde", serde(default))]
19889    pub mission_type: MavMissionType,
19890}
19891impl MISSION_ITEM_INT_DATA {
19892    pub const ENCODED_LEN: usize = 38usize;
19893    pub const DEFAULT: Self = Self {
19894        param1: 0.0_f32,
19895        param2: 0.0_f32,
19896        param3: 0.0_f32,
19897        param4: 0.0_f32,
19898        x: 0_i32,
19899        y: 0_i32,
19900        z: 0.0_f32,
19901        seq: 0_u16,
19902        command: MavCmd::DEFAULT,
19903        target_system: 0_u8,
19904        target_component: 0_u8,
19905        frame: MavFrame::DEFAULT,
19906        current: 0_u8,
19907        autocontinue: 0_u8,
19908        mission_type: MavMissionType::DEFAULT,
19909    };
19910    #[cfg(feature = "arbitrary")]
19911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19912        use arbitrary::{Arbitrary, Unstructured};
19913        let mut buf = [0u8; 1024];
19914        rng.fill_bytes(&mut buf);
19915        let mut unstructured = Unstructured::new(&buf);
19916        Self::arbitrary(&mut unstructured).unwrap_or_default()
19917    }
19918}
19919impl Default for MISSION_ITEM_INT_DATA {
19920    fn default() -> Self {
19921        Self::DEFAULT.clone()
19922    }
19923}
19924impl MessageData for MISSION_ITEM_INT_DATA {
19925    type Message = MavMessage;
19926    const ID: u32 = 73u32;
19927    const NAME: &'static str = "MISSION_ITEM_INT";
19928    const EXTRA_CRC: u8 = 38u8;
19929    const ENCODED_LEN: usize = 38usize;
19930    fn deser(
19931        _version: MavlinkVersion,
19932        __input: &[u8],
19933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19934        let avail_len = __input.len();
19935        let mut payload_buf = [0; Self::ENCODED_LEN];
19936        let mut buf = if avail_len < Self::ENCODED_LEN {
19937            payload_buf[0..avail_len].copy_from_slice(__input);
19938            Bytes::new(&payload_buf)
19939        } else {
19940            Bytes::new(__input)
19941        };
19942        let mut __struct = Self::default();
19943        __struct.param1 = buf.get_f32_le();
19944        __struct.param2 = buf.get_f32_le();
19945        __struct.param3 = buf.get_f32_le();
19946        __struct.param4 = buf.get_f32_le();
19947        __struct.x = buf.get_i32_le();
19948        __struct.y = buf.get_i32_le();
19949        __struct.z = buf.get_f32_le();
19950        __struct.seq = buf.get_u16_le();
19951        let tmp = buf.get_u16_le();
19952        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19953            ::mavlink_core::error::ParserError::InvalidEnum {
19954                enum_type: "MavCmd",
19955                value: tmp as u32,
19956            },
19957        )?;
19958        __struct.target_system = buf.get_u8();
19959        __struct.target_component = buf.get_u8();
19960        let tmp = buf.get_u8();
19961        __struct.frame =
19962            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19963                enum_type: "MavFrame",
19964                value: tmp as u32,
19965            })?;
19966        __struct.current = buf.get_u8();
19967        __struct.autocontinue = buf.get_u8();
19968        let tmp = buf.get_u8();
19969        __struct.mission_type =
19970            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19971                enum_type: "MavMissionType",
19972                value: tmp as u32,
19973            })?;
19974        Ok(__struct)
19975    }
19976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19977        let mut __tmp = BytesMut::new(bytes);
19978        #[allow(clippy::absurd_extreme_comparisons)]
19979        #[allow(unused_comparisons)]
19980        if __tmp.remaining() < Self::ENCODED_LEN {
19981            panic!(
19982                "buffer is too small (need {} bytes, but got {})",
19983                Self::ENCODED_LEN,
19984                __tmp.remaining(),
19985            )
19986        }
19987        __tmp.put_f32_le(self.param1);
19988        __tmp.put_f32_le(self.param2);
19989        __tmp.put_f32_le(self.param3);
19990        __tmp.put_f32_le(self.param4);
19991        __tmp.put_i32_le(self.x);
19992        __tmp.put_i32_le(self.y);
19993        __tmp.put_f32_le(self.z);
19994        __tmp.put_u16_le(self.seq);
19995        __tmp.put_u16_le(self.command as u16);
19996        __tmp.put_u8(self.target_system);
19997        __tmp.put_u8(self.target_component);
19998        __tmp.put_u8(self.frame as u8);
19999        __tmp.put_u8(self.current);
20000        __tmp.put_u8(self.autocontinue);
20001        if matches!(version, MavlinkVersion::V2) {
20002            __tmp.put_u8(self.mission_type as u8);
20003            let len = __tmp.len();
20004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20005        } else {
20006            __tmp.len()
20007        }
20008    }
20009}
20010#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20011#[doc = ""]
20012#[doc = "ID: 46"]
20013#[derive(Debug, Clone, PartialEq)]
20014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20016#[cfg_attr(feature = "ts", derive(TS))]
20017#[cfg_attr(feature = "ts", ts(export))]
20018pub struct MISSION_ITEM_REACHED_DATA {
20019    #[doc = "Sequence"]
20020    pub seq: u16,
20021}
20022impl MISSION_ITEM_REACHED_DATA {
20023    pub const ENCODED_LEN: usize = 2usize;
20024    pub const DEFAULT: Self = Self { seq: 0_u16 };
20025    #[cfg(feature = "arbitrary")]
20026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20027        use arbitrary::{Arbitrary, Unstructured};
20028        let mut buf = [0u8; 1024];
20029        rng.fill_bytes(&mut buf);
20030        let mut unstructured = Unstructured::new(&buf);
20031        Self::arbitrary(&mut unstructured).unwrap_or_default()
20032    }
20033}
20034impl Default for MISSION_ITEM_REACHED_DATA {
20035    fn default() -> Self {
20036        Self::DEFAULT.clone()
20037    }
20038}
20039impl MessageData for MISSION_ITEM_REACHED_DATA {
20040    type Message = MavMessage;
20041    const ID: u32 = 46u32;
20042    const NAME: &'static str = "MISSION_ITEM_REACHED";
20043    const EXTRA_CRC: u8 = 11u8;
20044    const ENCODED_LEN: usize = 2usize;
20045    fn deser(
20046        _version: MavlinkVersion,
20047        __input: &[u8],
20048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20049        let avail_len = __input.len();
20050        let mut payload_buf = [0; Self::ENCODED_LEN];
20051        let mut buf = if avail_len < Self::ENCODED_LEN {
20052            payload_buf[0..avail_len].copy_from_slice(__input);
20053            Bytes::new(&payload_buf)
20054        } else {
20055            Bytes::new(__input)
20056        };
20057        let mut __struct = Self::default();
20058        __struct.seq = buf.get_u16_le();
20059        Ok(__struct)
20060    }
20061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20062        let mut __tmp = BytesMut::new(bytes);
20063        #[allow(clippy::absurd_extreme_comparisons)]
20064        #[allow(unused_comparisons)]
20065        if __tmp.remaining() < Self::ENCODED_LEN {
20066            panic!(
20067                "buffer is too small (need {} bytes, but got {})",
20068                Self::ENCODED_LEN,
20069                __tmp.remaining(),
20070            )
20071        }
20072        __tmp.put_u16_le(self.seq);
20073        if matches!(version, MavlinkVersion::V2) {
20074            let len = __tmp.len();
20075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20076        } else {
20077            __tmp.len()
20078        }
20079    }
20080}
20081#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20082#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20083#[doc = ""]
20084#[doc = "ID: 40"]
20085#[derive(Debug, Clone, PartialEq)]
20086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20088#[cfg_attr(feature = "ts", derive(TS))]
20089#[cfg_attr(feature = "ts", ts(export))]
20090pub struct MISSION_REQUEST_DATA {
20091    #[doc = "Sequence"]
20092    pub seq: u16,
20093    #[doc = "System ID"]
20094    pub target_system: u8,
20095    #[doc = "Component ID"]
20096    pub target_component: u8,
20097    #[doc = "Mission type."]
20098    #[cfg_attr(feature = "serde", serde(default))]
20099    pub mission_type: MavMissionType,
20100}
20101impl MISSION_REQUEST_DATA {
20102    pub const ENCODED_LEN: usize = 5usize;
20103    pub const DEFAULT: Self = Self {
20104        seq: 0_u16,
20105        target_system: 0_u8,
20106        target_component: 0_u8,
20107        mission_type: MavMissionType::DEFAULT,
20108    };
20109    #[cfg(feature = "arbitrary")]
20110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20111        use arbitrary::{Arbitrary, Unstructured};
20112        let mut buf = [0u8; 1024];
20113        rng.fill_bytes(&mut buf);
20114        let mut unstructured = Unstructured::new(&buf);
20115        Self::arbitrary(&mut unstructured).unwrap_or_default()
20116    }
20117}
20118impl Default for MISSION_REQUEST_DATA {
20119    fn default() -> Self {
20120        Self::DEFAULT.clone()
20121    }
20122}
20123impl MessageData for MISSION_REQUEST_DATA {
20124    type Message = MavMessage;
20125    const ID: u32 = 40u32;
20126    const NAME: &'static str = "MISSION_REQUEST";
20127    const EXTRA_CRC: u8 = 230u8;
20128    const ENCODED_LEN: usize = 5usize;
20129    fn deser(
20130        _version: MavlinkVersion,
20131        __input: &[u8],
20132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20133        let avail_len = __input.len();
20134        let mut payload_buf = [0; Self::ENCODED_LEN];
20135        let mut buf = if avail_len < Self::ENCODED_LEN {
20136            payload_buf[0..avail_len].copy_from_slice(__input);
20137            Bytes::new(&payload_buf)
20138        } else {
20139            Bytes::new(__input)
20140        };
20141        let mut __struct = Self::default();
20142        __struct.seq = buf.get_u16_le();
20143        __struct.target_system = buf.get_u8();
20144        __struct.target_component = buf.get_u8();
20145        let tmp = buf.get_u8();
20146        __struct.mission_type =
20147            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20148                enum_type: "MavMissionType",
20149                value: tmp as u32,
20150            })?;
20151        Ok(__struct)
20152    }
20153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20154        let mut __tmp = BytesMut::new(bytes);
20155        #[allow(clippy::absurd_extreme_comparisons)]
20156        #[allow(unused_comparisons)]
20157        if __tmp.remaining() < Self::ENCODED_LEN {
20158            panic!(
20159                "buffer is too small (need {} bytes, but got {})",
20160                Self::ENCODED_LEN,
20161                __tmp.remaining(),
20162            )
20163        }
20164        __tmp.put_u16_le(self.seq);
20165        __tmp.put_u8(self.target_system);
20166        __tmp.put_u8(self.target_component);
20167        if matches!(version, MavlinkVersion::V2) {
20168            __tmp.put_u8(self.mission_type as u8);
20169            let len = __tmp.len();
20170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20171        } else {
20172            __tmp.len()
20173        }
20174    }
20175}
20176#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20177#[doc = ""]
20178#[doc = "ID: 51"]
20179#[derive(Debug, Clone, PartialEq)]
20180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20182#[cfg_attr(feature = "ts", derive(TS))]
20183#[cfg_attr(feature = "ts", ts(export))]
20184pub struct MISSION_REQUEST_INT_DATA {
20185    #[doc = "Sequence"]
20186    pub seq: u16,
20187    #[doc = "System ID"]
20188    pub target_system: u8,
20189    #[doc = "Component ID"]
20190    pub target_component: u8,
20191    #[doc = "Mission type."]
20192    #[cfg_attr(feature = "serde", serde(default))]
20193    pub mission_type: MavMissionType,
20194}
20195impl MISSION_REQUEST_INT_DATA {
20196    pub const ENCODED_LEN: usize = 5usize;
20197    pub const DEFAULT: Self = Self {
20198        seq: 0_u16,
20199        target_system: 0_u8,
20200        target_component: 0_u8,
20201        mission_type: MavMissionType::DEFAULT,
20202    };
20203    #[cfg(feature = "arbitrary")]
20204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20205        use arbitrary::{Arbitrary, Unstructured};
20206        let mut buf = [0u8; 1024];
20207        rng.fill_bytes(&mut buf);
20208        let mut unstructured = Unstructured::new(&buf);
20209        Self::arbitrary(&mut unstructured).unwrap_or_default()
20210    }
20211}
20212impl Default for MISSION_REQUEST_INT_DATA {
20213    fn default() -> Self {
20214        Self::DEFAULT.clone()
20215    }
20216}
20217impl MessageData for MISSION_REQUEST_INT_DATA {
20218    type Message = MavMessage;
20219    const ID: u32 = 51u32;
20220    const NAME: &'static str = "MISSION_REQUEST_INT";
20221    const EXTRA_CRC: u8 = 196u8;
20222    const ENCODED_LEN: usize = 5usize;
20223    fn deser(
20224        _version: MavlinkVersion,
20225        __input: &[u8],
20226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20227        let avail_len = __input.len();
20228        let mut payload_buf = [0; Self::ENCODED_LEN];
20229        let mut buf = if avail_len < Self::ENCODED_LEN {
20230            payload_buf[0..avail_len].copy_from_slice(__input);
20231            Bytes::new(&payload_buf)
20232        } else {
20233            Bytes::new(__input)
20234        };
20235        let mut __struct = Self::default();
20236        __struct.seq = buf.get_u16_le();
20237        __struct.target_system = buf.get_u8();
20238        __struct.target_component = buf.get_u8();
20239        let tmp = buf.get_u8();
20240        __struct.mission_type =
20241            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20242                enum_type: "MavMissionType",
20243                value: tmp as u32,
20244            })?;
20245        Ok(__struct)
20246    }
20247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20248        let mut __tmp = BytesMut::new(bytes);
20249        #[allow(clippy::absurd_extreme_comparisons)]
20250        #[allow(unused_comparisons)]
20251        if __tmp.remaining() < Self::ENCODED_LEN {
20252            panic!(
20253                "buffer is too small (need {} bytes, but got {})",
20254                Self::ENCODED_LEN,
20255                __tmp.remaining(),
20256            )
20257        }
20258        __tmp.put_u16_le(self.seq);
20259        __tmp.put_u8(self.target_system);
20260        __tmp.put_u8(self.target_component);
20261        if matches!(version, MavlinkVersion::V2) {
20262            __tmp.put_u8(self.mission_type as u8);
20263            let len = __tmp.len();
20264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20265        } else {
20266            __tmp.len()
20267        }
20268    }
20269}
20270#[doc = "Request the overall list of mission items from the system/component."]
20271#[doc = ""]
20272#[doc = "ID: 43"]
20273#[derive(Debug, Clone, PartialEq)]
20274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20276#[cfg_attr(feature = "ts", derive(TS))]
20277#[cfg_attr(feature = "ts", ts(export))]
20278pub struct MISSION_REQUEST_LIST_DATA {
20279    #[doc = "System ID"]
20280    pub target_system: u8,
20281    #[doc = "Component ID"]
20282    pub target_component: u8,
20283    #[doc = "Mission type."]
20284    #[cfg_attr(feature = "serde", serde(default))]
20285    pub mission_type: MavMissionType,
20286}
20287impl MISSION_REQUEST_LIST_DATA {
20288    pub const ENCODED_LEN: usize = 3usize;
20289    pub const DEFAULT: Self = Self {
20290        target_system: 0_u8,
20291        target_component: 0_u8,
20292        mission_type: MavMissionType::DEFAULT,
20293    };
20294    #[cfg(feature = "arbitrary")]
20295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20296        use arbitrary::{Arbitrary, Unstructured};
20297        let mut buf = [0u8; 1024];
20298        rng.fill_bytes(&mut buf);
20299        let mut unstructured = Unstructured::new(&buf);
20300        Self::arbitrary(&mut unstructured).unwrap_or_default()
20301    }
20302}
20303impl Default for MISSION_REQUEST_LIST_DATA {
20304    fn default() -> Self {
20305        Self::DEFAULT.clone()
20306    }
20307}
20308impl MessageData for MISSION_REQUEST_LIST_DATA {
20309    type Message = MavMessage;
20310    const ID: u32 = 43u32;
20311    const NAME: &'static str = "MISSION_REQUEST_LIST";
20312    const EXTRA_CRC: u8 = 132u8;
20313    const ENCODED_LEN: usize = 3usize;
20314    fn deser(
20315        _version: MavlinkVersion,
20316        __input: &[u8],
20317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20318        let avail_len = __input.len();
20319        let mut payload_buf = [0; Self::ENCODED_LEN];
20320        let mut buf = if avail_len < Self::ENCODED_LEN {
20321            payload_buf[0..avail_len].copy_from_slice(__input);
20322            Bytes::new(&payload_buf)
20323        } else {
20324            Bytes::new(__input)
20325        };
20326        let mut __struct = Self::default();
20327        __struct.target_system = buf.get_u8();
20328        __struct.target_component = buf.get_u8();
20329        let tmp = buf.get_u8();
20330        __struct.mission_type =
20331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20332                enum_type: "MavMissionType",
20333                value: tmp as u32,
20334            })?;
20335        Ok(__struct)
20336    }
20337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20338        let mut __tmp = BytesMut::new(bytes);
20339        #[allow(clippy::absurd_extreme_comparisons)]
20340        #[allow(unused_comparisons)]
20341        if __tmp.remaining() < Self::ENCODED_LEN {
20342            panic!(
20343                "buffer is too small (need {} bytes, but got {})",
20344                Self::ENCODED_LEN,
20345                __tmp.remaining(),
20346            )
20347        }
20348        __tmp.put_u8(self.target_system);
20349        __tmp.put_u8(self.target_component);
20350        if matches!(version, MavlinkVersion::V2) {
20351            __tmp.put_u8(self.mission_type as u8);
20352            let len = __tmp.len();
20353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20354        } else {
20355            __tmp.len()
20356        }
20357    }
20358}
20359#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20360#[doc = ""]
20361#[doc = "ID: 37"]
20362#[derive(Debug, Clone, PartialEq)]
20363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20365#[cfg_attr(feature = "ts", derive(TS))]
20366#[cfg_attr(feature = "ts", ts(export))]
20367pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20368    #[doc = "Start index"]
20369    pub start_index: i16,
20370    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20371    pub end_index: i16,
20372    #[doc = "System ID"]
20373    pub target_system: u8,
20374    #[doc = "Component ID"]
20375    pub target_component: u8,
20376    #[doc = "Mission type."]
20377    #[cfg_attr(feature = "serde", serde(default))]
20378    pub mission_type: MavMissionType,
20379}
20380impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20381    pub const ENCODED_LEN: usize = 7usize;
20382    pub const DEFAULT: Self = Self {
20383        start_index: 0_i16,
20384        end_index: 0_i16,
20385        target_system: 0_u8,
20386        target_component: 0_u8,
20387        mission_type: MavMissionType::DEFAULT,
20388    };
20389    #[cfg(feature = "arbitrary")]
20390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20391        use arbitrary::{Arbitrary, Unstructured};
20392        let mut buf = [0u8; 1024];
20393        rng.fill_bytes(&mut buf);
20394        let mut unstructured = Unstructured::new(&buf);
20395        Self::arbitrary(&mut unstructured).unwrap_or_default()
20396    }
20397}
20398impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20399    fn default() -> Self {
20400        Self::DEFAULT.clone()
20401    }
20402}
20403impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20404    type Message = MavMessage;
20405    const ID: u32 = 37u32;
20406    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20407    const EXTRA_CRC: u8 = 212u8;
20408    const ENCODED_LEN: usize = 7usize;
20409    fn deser(
20410        _version: MavlinkVersion,
20411        __input: &[u8],
20412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20413        let avail_len = __input.len();
20414        let mut payload_buf = [0; Self::ENCODED_LEN];
20415        let mut buf = if avail_len < Self::ENCODED_LEN {
20416            payload_buf[0..avail_len].copy_from_slice(__input);
20417            Bytes::new(&payload_buf)
20418        } else {
20419            Bytes::new(__input)
20420        };
20421        let mut __struct = Self::default();
20422        __struct.start_index = buf.get_i16_le();
20423        __struct.end_index = buf.get_i16_le();
20424        __struct.target_system = buf.get_u8();
20425        __struct.target_component = buf.get_u8();
20426        let tmp = buf.get_u8();
20427        __struct.mission_type =
20428            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20429                enum_type: "MavMissionType",
20430                value: tmp as u32,
20431            })?;
20432        Ok(__struct)
20433    }
20434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20435        let mut __tmp = BytesMut::new(bytes);
20436        #[allow(clippy::absurd_extreme_comparisons)]
20437        #[allow(unused_comparisons)]
20438        if __tmp.remaining() < Self::ENCODED_LEN {
20439            panic!(
20440                "buffer is too small (need {} bytes, but got {})",
20441                Self::ENCODED_LEN,
20442                __tmp.remaining(),
20443            )
20444        }
20445        __tmp.put_i16_le(self.start_index);
20446        __tmp.put_i16_le(self.end_index);
20447        __tmp.put_u8(self.target_system);
20448        __tmp.put_u8(self.target_component);
20449        if matches!(version, MavlinkVersion::V2) {
20450            __tmp.put_u8(self.mission_type as u8);
20451            let len = __tmp.len();
20452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20453        } else {
20454            __tmp.len()
20455        }
20456    }
20457}
20458#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20459#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20460#[doc = ""]
20461#[doc = "ID: 41"]
20462#[derive(Debug, Clone, PartialEq)]
20463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20465#[cfg_attr(feature = "ts", derive(TS))]
20466#[cfg_attr(feature = "ts", ts(export))]
20467pub struct MISSION_SET_CURRENT_DATA {
20468    #[doc = "Sequence"]
20469    pub seq: u16,
20470    #[doc = "System ID"]
20471    pub target_system: u8,
20472    #[doc = "Component ID"]
20473    pub target_component: u8,
20474}
20475impl MISSION_SET_CURRENT_DATA {
20476    pub const ENCODED_LEN: usize = 4usize;
20477    pub const DEFAULT: Self = Self {
20478        seq: 0_u16,
20479        target_system: 0_u8,
20480        target_component: 0_u8,
20481    };
20482    #[cfg(feature = "arbitrary")]
20483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20484        use arbitrary::{Arbitrary, Unstructured};
20485        let mut buf = [0u8; 1024];
20486        rng.fill_bytes(&mut buf);
20487        let mut unstructured = Unstructured::new(&buf);
20488        Self::arbitrary(&mut unstructured).unwrap_or_default()
20489    }
20490}
20491impl Default for MISSION_SET_CURRENT_DATA {
20492    fn default() -> Self {
20493        Self::DEFAULT.clone()
20494    }
20495}
20496impl MessageData for MISSION_SET_CURRENT_DATA {
20497    type Message = MavMessage;
20498    const ID: u32 = 41u32;
20499    const NAME: &'static str = "MISSION_SET_CURRENT";
20500    const EXTRA_CRC: u8 = 28u8;
20501    const ENCODED_LEN: usize = 4usize;
20502    fn deser(
20503        _version: MavlinkVersion,
20504        __input: &[u8],
20505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20506        let avail_len = __input.len();
20507        let mut payload_buf = [0; Self::ENCODED_LEN];
20508        let mut buf = if avail_len < Self::ENCODED_LEN {
20509            payload_buf[0..avail_len].copy_from_slice(__input);
20510            Bytes::new(&payload_buf)
20511        } else {
20512            Bytes::new(__input)
20513        };
20514        let mut __struct = Self::default();
20515        __struct.seq = buf.get_u16_le();
20516        __struct.target_system = buf.get_u8();
20517        __struct.target_component = buf.get_u8();
20518        Ok(__struct)
20519    }
20520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20521        let mut __tmp = BytesMut::new(bytes);
20522        #[allow(clippy::absurd_extreme_comparisons)]
20523        #[allow(unused_comparisons)]
20524        if __tmp.remaining() < Self::ENCODED_LEN {
20525            panic!(
20526                "buffer is too small (need {} bytes, but got {})",
20527                Self::ENCODED_LEN,
20528                __tmp.remaining(),
20529            )
20530        }
20531        __tmp.put_u16_le(self.seq);
20532        __tmp.put_u8(self.target_system);
20533        __tmp.put_u8(self.target_component);
20534        if matches!(version, MavlinkVersion::V2) {
20535            let len = __tmp.len();
20536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20537        } else {
20538            __tmp.len()
20539        }
20540    }
20541}
20542#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20543#[doc = ""]
20544#[doc = "ID: 38"]
20545#[derive(Debug, Clone, PartialEq)]
20546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20548#[cfg_attr(feature = "ts", derive(TS))]
20549#[cfg_attr(feature = "ts", ts(export))]
20550pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20551    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20552    pub start_index: i16,
20553    #[doc = "End index, equal or greater than start index."]
20554    pub end_index: i16,
20555    #[doc = "System ID"]
20556    pub target_system: u8,
20557    #[doc = "Component ID"]
20558    pub target_component: u8,
20559    #[doc = "Mission type."]
20560    #[cfg_attr(feature = "serde", serde(default))]
20561    pub mission_type: MavMissionType,
20562}
20563impl MISSION_WRITE_PARTIAL_LIST_DATA {
20564    pub const ENCODED_LEN: usize = 7usize;
20565    pub const DEFAULT: Self = Self {
20566        start_index: 0_i16,
20567        end_index: 0_i16,
20568        target_system: 0_u8,
20569        target_component: 0_u8,
20570        mission_type: MavMissionType::DEFAULT,
20571    };
20572    #[cfg(feature = "arbitrary")]
20573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20574        use arbitrary::{Arbitrary, Unstructured};
20575        let mut buf = [0u8; 1024];
20576        rng.fill_bytes(&mut buf);
20577        let mut unstructured = Unstructured::new(&buf);
20578        Self::arbitrary(&mut unstructured).unwrap_or_default()
20579    }
20580}
20581impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20582    fn default() -> Self {
20583        Self::DEFAULT.clone()
20584    }
20585}
20586impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20587    type Message = MavMessage;
20588    const ID: u32 = 38u32;
20589    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20590    const EXTRA_CRC: u8 = 9u8;
20591    const ENCODED_LEN: usize = 7usize;
20592    fn deser(
20593        _version: MavlinkVersion,
20594        __input: &[u8],
20595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20596        let avail_len = __input.len();
20597        let mut payload_buf = [0; Self::ENCODED_LEN];
20598        let mut buf = if avail_len < Self::ENCODED_LEN {
20599            payload_buf[0..avail_len].copy_from_slice(__input);
20600            Bytes::new(&payload_buf)
20601        } else {
20602            Bytes::new(__input)
20603        };
20604        let mut __struct = Self::default();
20605        __struct.start_index = buf.get_i16_le();
20606        __struct.end_index = buf.get_i16_le();
20607        __struct.target_system = buf.get_u8();
20608        __struct.target_component = buf.get_u8();
20609        let tmp = buf.get_u8();
20610        __struct.mission_type =
20611            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20612                enum_type: "MavMissionType",
20613                value: tmp as u32,
20614            })?;
20615        Ok(__struct)
20616    }
20617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20618        let mut __tmp = BytesMut::new(bytes);
20619        #[allow(clippy::absurd_extreme_comparisons)]
20620        #[allow(unused_comparisons)]
20621        if __tmp.remaining() < Self::ENCODED_LEN {
20622            panic!(
20623                "buffer is too small (need {} bytes, but got {})",
20624                Self::ENCODED_LEN,
20625                __tmp.remaining(),
20626            )
20627        }
20628        __tmp.put_i16_le(self.start_index);
20629        __tmp.put_i16_le(self.end_index);
20630        __tmp.put_u8(self.target_system);
20631        __tmp.put_u8(self.target_component);
20632        if matches!(version, MavlinkVersion::V2) {
20633            __tmp.put_u8(self.mission_type as u8);
20634            let len = __tmp.len();
20635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20636        } else {
20637            __tmp.len()
20638        }
20639    }
20640}
20641#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20642#[doc = "Orientation of a mount."]
20643#[doc = ""]
20644#[doc = "ID: 265"]
20645#[derive(Debug, Clone, PartialEq)]
20646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20648#[cfg_attr(feature = "ts", derive(TS))]
20649#[cfg_attr(feature = "ts", ts(export))]
20650pub struct MOUNT_ORIENTATION_DATA {
20651    #[doc = "Timestamp (time since system boot)."]
20652    pub time_boot_ms: u32,
20653    #[doc = "Roll in global frame (set to NaN for invalid)."]
20654    pub roll: f32,
20655    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20656    pub pitch: f32,
20657    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20658    pub yaw: f32,
20659    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20660    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20661    pub yaw_absolute: f32,
20662}
20663impl MOUNT_ORIENTATION_DATA {
20664    pub const ENCODED_LEN: usize = 20usize;
20665    pub const DEFAULT: Self = Self {
20666        time_boot_ms: 0_u32,
20667        roll: 0.0_f32,
20668        pitch: 0.0_f32,
20669        yaw: 0.0_f32,
20670        yaw_absolute: 0.0_f32,
20671    };
20672    #[cfg(feature = "arbitrary")]
20673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20674        use arbitrary::{Arbitrary, Unstructured};
20675        let mut buf = [0u8; 1024];
20676        rng.fill_bytes(&mut buf);
20677        let mut unstructured = Unstructured::new(&buf);
20678        Self::arbitrary(&mut unstructured).unwrap_or_default()
20679    }
20680}
20681impl Default for MOUNT_ORIENTATION_DATA {
20682    fn default() -> Self {
20683        Self::DEFAULT.clone()
20684    }
20685}
20686impl MessageData for MOUNT_ORIENTATION_DATA {
20687    type Message = MavMessage;
20688    const ID: u32 = 265u32;
20689    const NAME: &'static str = "MOUNT_ORIENTATION";
20690    const EXTRA_CRC: u8 = 26u8;
20691    const ENCODED_LEN: usize = 20usize;
20692    fn deser(
20693        _version: MavlinkVersion,
20694        __input: &[u8],
20695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20696        let avail_len = __input.len();
20697        let mut payload_buf = [0; Self::ENCODED_LEN];
20698        let mut buf = if avail_len < Self::ENCODED_LEN {
20699            payload_buf[0..avail_len].copy_from_slice(__input);
20700            Bytes::new(&payload_buf)
20701        } else {
20702            Bytes::new(__input)
20703        };
20704        let mut __struct = Self::default();
20705        __struct.time_boot_ms = buf.get_u32_le();
20706        __struct.roll = buf.get_f32_le();
20707        __struct.pitch = buf.get_f32_le();
20708        __struct.yaw = buf.get_f32_le();
20709        __struct.yaw_absolute = buf.get_f32_le();
20710        Ok(__struct)
20711    }
20712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20713        let mut __tmp = BytesMut::new(bytes);
20714        #[allow(clippy::absurd_extreme_comparisons)]
20715        #[allow(unused_comparisons)]
20716        if __tmp.remaining() < Self::ENCODED_LEN {
20717            panic!(
20718                "buffer is too small (need {} bytes, but got {})",
20719                Self::ENCODED_LEN,
20720                __tmp.remaining(),
20721            )
20722        }
20723        __tmp.put_u32_le(self.time_boot_ms);
20724        __tmp.put_f32_le(self.roll);
20725        __tmp.put_f32_le(self.pitch);
20726        __tmp.put_f32_le(self.yaw);
20727        if matches!(version, MavlinkVersion::V2) {
20728            __tmp.put_f32_le(self.yaw_absolute);
20729            let len = __tmp.len();
20730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20731        } else {
20732            __tmp.len()
20733        }
20734    }
20735}
20736#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20737#[doc = ""]
20738#[doc = "ID: 251"]
20739#[derive(Debug, Clone, PartialEq)]
20740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20742#[cfg_attr(feature = "ts", derive(TS))]
20743#[cfg_attr(feature = "ts", ts(export))]
20744pub struct NAMED_VALUE_FLOAT_DATA {
20745    #[doc = "Timestamp (time since system boot)."]
20746    pub time_boot_ms: u32,
20747    #[doc = "Floating point value"]
20748    pub value: f32,
20749    #[doc = "Name of the debug variable"]
20750    #[cfg_attr(
20751        feature = "serde",
20752        serde(
20753            serialize_with = "crate::nulstr::serialize::<_, 10>",
20754            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
20755        )
20756    )]
20757    #[cfg_attr(feature = "ts", ts(type = "string"))]
20758    pub name: [u8; 10],
20759}
20760impl NAMED_VALUE_FLOAT_DATA {
20761    pub const ENCODED_LEN: usize = 18usize;
20762    pub const DEFAULT: Self = Self {
20763        time_boot_ms: 0_u32,
20764        value: 0.0_f32,
20765        name: [0_u8; 10usize],
20766    };
20767    #[cfg(feature = "arbitrary")]
20768    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20769        use arbitrary::{Arbitrary, Unstructured};
20770        let mut buf = [0u8; 1024];
20771        rng.fill_bytes(&mut buf);
20772        let mut unstructured = Unstructured::new(&buf);
20773        Self::arbitrary(&mut unstructured).unwrap_or_default()
20774    }
20775}
20776impl Default for NAMED_VALUE_FLOAT_DATA {
20777    fn default() -> Self {
20778        Self::DEFAULT.clone()
20779    }
20780}
20781impl MessageData for NAMED_VALUE_FLOAT_DATA {
20782    type Message = MavMessage;
20783    const ID: u32 = 251u32;
20784    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20785    const EXTRA_CRC: u8 = 170u8;
20786    const ENCODED_LEN: usize = 18usize;
20787    fn deser(
20788        _version: MavlinkVersion,
20789        __input: &[u8],
20790    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20791        let avail_len = __input.len();
20792        let mut payload_buf = [0; Self::ENCODED_LEN];
20793        let mut buf = if avail_len < Self::ENCODED_LEN {
20794            payload_buf[0..avail_len].copy_from_slice(__input);
20795            Bytes::new(&payload_buf)
20796        } else {
20797            Bytes::new(__input)
20798        };
20799        let mut __struct = Self::default();
20800        __struct.time_boot_ms = buf.get_u32_le();
20801        __struct.value = buf.get_f32_le();
20802        for v in &mut __struct.name {
20803            let val = buf.get_u8();
20804            *v = val;
20805        }
20806        Ok(__struct)
20807    }
20808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20809        let mut __tmp = BytesMut::new(bytes);
20810        #[allow(clippy::absurd_extreme_comparisons)]
20811        #[allow(unused_comparisons)]
20812        if __tmp.remaining() < Self::ENCODED_LEN {
20813            panic!(
20814                "buffer is too small (need {} bytes, but got {})",
20815                Self::ENCODED_LEN,
20816                __tmp.remaining(),
20817            )
20818        }
20819        __tmp.put_u32_le(self.time_boot_ms);
20820        __tmp.put_f32_le(self.value);
20821        for val in &self.name {
20822            __tmp.put_u8(*val);
20823        }
20824        if matches!(version, MavlinkVersion::V2) {
20825            let len = __tmp.len();
20826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20827        } else {
20828            __tmp.len()
20829        }
20830    }
20831}
20832#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20833#[doc = ""]
20834#[doc = "ID: 252"]
20835#[derive(Debug, Clone, PartialEq)]
20836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20838#[cfg_attr(feature = "ts", derive(TS))]
20839#[cfg_attr(feature = "ts", ts(export))]
20840pub struct NAMED_VALUE_INT_DATA {
20841    #[doc = "Timestamp (time since system boot)."]
20842    pub time_boot_ms: u32,
20843    #[doc = "Signed integer value"]
20844    pub value: i32,
20845    #[doc = "Name of the debug variable"]
20846    #[cfg_attr(
20847        feature = "serde",
20848        serde(
20849            serialize_with = "crate::nulstr::serialize::<_, 10>",
20850            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
20851        )
20852    )]
20853    #[cfg_attr(feature = "ts", ts(type = "string"))]
20854    pub name: [u8; 10],
20855}
20856impl NAMED_VALUE_INT_DATA {
20857    pub const ENCODED_LEN: usize = 18usize;
20858    pub const DEFAULT: Self = Self {
20859        time_boot_ms: 0_u32,
20860        value: 0_i32,
20861        name: [0_u8; 10usize],
20862    };
20863    #[cfg(feature = "arbitrary")]
20864    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20865        use arbitrary::{Arbitrary, Unstructured};
20866        let mut buf = [0u8; 1024];
20867        rng.fill_bytes(&mut buf);
20868        let mut unstructured = Unstructured::new(&buf);
20869        Self::arbitrary(&mut unstructured).unwrap_or_default()
20870    }
20871}
20872impl Default for NAMED_VALUE_INT_DATA {
20873    fn default() -> Self {
20874        Self::DEFAULT.clone()
20875    }
20876}
20877impl MessageData for NAMED_VALUE_INT_DATA {
20878    type Message = MavMessage;
20879    const ID: u32 = 252u32;
20880    const NAME: &'static str = "NAMED_VALUE_INT";
20881    const EXTRA_CRC: u8 = 44u8;
20882    const ENCODED_LEN: usize = 18usize;
20883    fn deser(
20884        _version: MavlinkVersion,
20885        __input: &[u8],
20886    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20887        let avail_len = __input.len();
20888        let mut payload_buf = [0; Self::ENCODED_LEN];
20889        let mut buf = if avail_len < Self::ENCODED_LEN {
20890            payload_buf[0..avail_len].copy_from_slice(__input);
20891            Bytes::new(&payload_buf)
20892        } else {
20893            Bytes::new(__input)
20894        };
20895        let mut __struct = Self::default();
20896        __struct.time_boot_ms = buf.get_u32_le();
20897        __struct.value = buf.get_i32_le();
20898        for v in &mut __struct.name {
20899            let val = buf.get_u8();
20900            *v = val;
20901        }
20902        Ok(__struct)
20903    }
20904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20905        let mut __tmp = BytesMut::new(bytes);
20906        #[allow(clippy::absurd_extreme_comparisons)]
20907        #[allow(unused_comparisons)]
20908        if __tmp.remaining() < Self::ENCODED_LEN {
20909            panic!(
20910                "buffer is too small (need {} bytes, but got {})",
20911                Self::ENCODED_LEN,
20912                __tmp.remaining(),
20913            )
20914        }
20915        __tmp.put_u32_le(self.time_boot_ms);
20916        __tmp.put_i32_le(self.value);
20917        for val in &self.name {
20918            __tmp.put_u8(*val);
20919        }
20920        if matches!(version, MavlinkVersion::V2) {
20921            let len = __tmp.len();
20922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20923        } else {
20924            __tmp.len()
20925        }
20926    }
20927}
20928#[doc = "The state of the navigation and position controller."]
20929#[doc = ""]
20930#[doc = "ID: 62"]
20931#[derive(Debug, Clone, PartialEq)]
20932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20934#[cfg_attr(feature = "ts", derive(TS))]
20935#[cfg_attr(feature = "ts", ts(export))]
20936pub struct NAV_CONTROLLER_OUTPUT_DATA {
20937    #[doc = "Current desired roll"]
20938    pub nav_roll: f32,
20939    #[doc = "Current desired pitch"]
20940    pub nav_pitch: f32,
20941    #[doc = "Current altitude error"]
20942    pub alt_error: f32,
20943    #[doc = "Current airspeed error"]
20944    pub aspd_error: f32,
20945    #[doc = "Current crosstrack error on x-y plane"]
20946    pub xtrack_error: f32,
20947    #[doc = "Current desired heading"]
20948    pub nav_bearing: i16,
20949    #[doc = "Bearing to current waypoint/target"]
20950    pub target_bearing: i16,
20951    #[doc = "Distance to active waypoint"]
20952    pub wp_dist: u16,
20953}
20954impl NAV_CONTROLLER_OUTPUT_DATA {
20955    pub const ENCODED_LEN: usize = 26usize;
20956    pub const DEFAULT: Self = Self {
20957        nav_roll: 0.0_f32,
20958        nav_pitch: 0.0_f32,
20959        alt_error: 0.0_f32,
20960        aspd_error: 0.0_f32,
20961        xtrack_error: 0.0_f32,
20962        nav_bearing: 0_i16,
20963        target_bearing: 0_i16,
20964        wp_dist: 0_u16,
20965    };
20966    #[cfg(feature = "arbitrary")]
20967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20968        use arbitrary::{Arbitrary, Unstructured};
20969        let mut buf = [0u8; 1024];
20970        rng.fill_bytes(&mut buf);
20971        let mut unstructured = Unstructured::new(&buf);
20972        Self::arbitrary(&mut unstructured).unwrap_or_default()
20973    }
20974}
20975impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20976    fn default() -> Self {
20977        Self::DEFAULT.clone()
20978    }
20979}
20980impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20981    type Message = MavMessage;
20982    const ID: u32 = 62u32;
20983    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20984    const EXTRA_CRC: u8 = 183u8;
20985    const ENCODED_LEN: usize = 26usize;
20986    fn deser(
20987        _version: MavlinkVersion,
20988        __input: &[u8],
20989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20990        let avail_len = __input.len();
20991        let mut payload_buf = [0; Self::ENCODED_LEN];
20992        let mut buf = if avail_len < Self::ENCODED_LEN {
20993            payload_buf[0..avail_len].copy_from_slice(__input);
20994            Bytes::new(&payload_buf)
20995        } else {
20996            Bytes::new(__input)
20997        };
20998        let mut __struct = Self::default();
20999        __struct.nav_roll = buf.get_f32_le();
21000        __struct.nav_pitch = buf.get_f32_le();
21001        __struct.alt_error = buf.get_f32_le();
21002        __struct.aspd_error = buf.get_f32_le();
21003        __struct.xtrack_error = buf.get_f32_le();
21004        __struct.nav_bearing = buf.get_i16_le();
21005        __struct.target_bearing = buf.get_i16_le();
21006        __struct.wp_dist = buf.get_u16_le();
21007        Ok(__struct)
21008    }
21009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21010        let mut __tmp = BytesMut::new(bytes);
21011        #[allow(clippy::absurd_extreme_comparisons)]
21012        #[allow(unused_comparisons)]
21013        if __tmp.remaining() < Self::ENCODED_LEN {
21014            panic!(
21015                "buffer is too small (need {} bytes, but got {})",
21016                Self::ENCODED_LEN,
21017                __tmp.remaining(),
21018            )
21019        }
21020        __tmp.put_f32_le(self.nav_roll);
21021        __tmp.put_f32_le(self.nav_pitch);
21022        __tmp.put_f32_le(self.alt_error);
21023        __tmp.put_f32_le(self.aspd_error);
21024        __tmp.put_f32_le(self.xtrack_error);
21025        __tmp.put_i16_le(self.nav_bearing);
21026        __tmp.put_i16_le(self.target_bearing);
21027        __tmp.put_u16_le(self.wp_dist);
21028        if matches!(version, MavlinkVersion::V2) {
21029            let len = __tmp.len();
21030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21031        } else {
21032            __tmp.len()
21033        }
21034    }
21035}
21036#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21037#[doc = ""]
21038#[doc = "ID: 330"]
21039#[derive(Debug, Clone, PartialEq)]
21040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21042#[cfg_attr(feature = "ts", derive(TS))]
21043#[cfg_attr(feature = "ts", ts(export))]
21044pub struct OBSTACLE_DISTANCE_DATA {
21045    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21046    pub time_usec: u64,
21047    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21049    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21050    pub distances: [u16; 72],
21051    #[doc = "Minimum distance the sensor can measure."]
21052    pub min_distance: u16,
21053    #[doc = "Maximum distance the sensor can measure."]
21054    pub max_distance: u16,
21055    #[doc = "Class id of the distance sensor type."]
21056    pub sensor_type: MavDistanceSensor,
21057    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21058    pub increment: u8,
21059    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21060    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21061    pub increment_f: f32,
21062    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21063    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21064    pub angle_offset: f32,
21065    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21066    #[cfg_attr(feature = "serde", serde(default))]
21067    pub frame: MavFrame,
21068}
21069impl OBSTACLE_DISTANCE_DATA {
21070    pub const ENCODED_LEN: usize = 167usize;
21071    pub const DEFAULT: Self = Self {
21072        time_usec: 0_u64,
21073        distances: [0_u16; 72usize],
21074        min_distance: 0_u16,
21075        max_distance: 0_u16,
21076        sensor_type: MavDistanceSensor::DEFAULT,
21077        increment: 0_u8,
21078        increment_f: 0.0_f32,
21079        angle_offset: 0.0_f32,
21080        frame: MavFrame::DEFAULT,
21081    };
21082    #[cfg(feature = "arbitrary")]
21083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21084        use arbitrary::{Arbitrary, Unstructured};
21085        let mut buf = [0u8; 1024];
21086        rng.fill_bytes(&mut buf);
21087        let mut unstructured = Unstructured::new(&buf);
21088        Self::arbitrary(&mut unstructured).unwrap_or_default()
21089    }
21090}
21091impl Default for OBSTACLE_DISTANCE_DATA {
21092    fn default() -> Self {
21093        Self::DEFAULT.clone()
21094    }
21095}
21096impl MessageData for OBSTACLE_DISTANCE_DATA {
21097    type Message = MavMessage;
21098    const ID: u32 = 330u32;
21099    const NAME: &'static str = "OBSTACLE_DISTANCE";
21100    const EXTRA_CRC: u8 = 23u8;
21101    const ENCODED_LEN: usize = 167usize;
21102    fn deser(
21103        _version: MavlinkVersion,
21104        __input: &[u8],
21105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21106        let avail_len = __input.len();
21107        let mut payload_buf = [0; Self::ENCODED_LEN];
21108        let mut buf = if avail_len < Self::ENCODED_LEN {
21109            payload_buf[0..avail_len].copy_from_slice(__input);
21110            Bytes::new(&payload_buf)
21111        } else {
21112            Bytes::new(__input)
21113        };
21114        let mut __struct = Self::default();
21115        __struct.time_usec = buf.get_u64_le();
21116        for v in &mut __struct.distances {
21117            let val = buf.get_u16_le();
21118            *v = val;
21119        }
21120        __struct.min_distance = buf.get_u16_le();
21121        __struct.max_distance = buf.get_u16_le();
21122        let tmp = buf.get_u8();
21123        __struct.sensor_type =
21124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21125                enum_type: "MavDistanceSensor",
21126                value: tmp as u32,
21127            })?;
21128        __struct.increment = buf.get_u8();
21129        __struct.increment_f = buf.get_f32_le();
21130        __struct.angle_offset = buf.get_f32_le();
21131        let tmp = buf.get_u8();
21132        __struct.frame =
21133            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21134                enum_type: "MavFrame",
21135                value: tmp as u32,
21136            })?;
21137        Ok(__struct)
21138    }
21139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21140        let mut __tmp = BytesMut::new(bytes);
21141        #[allow(clippy::absurd_extreme_comparisons)]
21142        #[allow(unused_comparisons)]
21143        if __tmp.remaining() < Self::ENCODED_LEN {
21144            panic!(
21145                "buffer is too small (need {} bytes, but got {})",
21146                Self::ENCODED_LEN,
21147                __tmp.remaining(),
21148            )
21149        }
21150        __tmp.put_u64_le(self.time_usec);
21151        for val in &self.distances {
21152            __tmp.put_u16_le(*val);
21153        }
21154        __tmp.put_u16_le(self.min_distance);
21155        __tmp.put_u16_le(self.max_distance);
21156        __tmp.put_u8(self.sensor_type as u8);
21157        __tmp.put_u8(self.increment);
21158        if matches!(version, MavlinkVersion::V2) {
21159            __tmp.put_f32_le(self.increment_f);
21160            __tmp.put_f32_le(self.angle_offset);
21161            __tmp.put_u8(self.frame as u8);
21162            let len = __tmp.len();
21163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21164        } else {
21165            __tmp.len()
21166        }
21167    }
21168}
21169#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21170#[doc = ""]
21171#[doc = "ID: 331"]
21172#[derive(Debug, Clone, PartialEq)]
21173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21175#[cfg_attr(feature = "ts", derive(TS))]
21176#[cfg_attr(feature = "ts", ts(export))]
21177pub struct ODOMETRY_DATA {
21178    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21179    pub time_usec: u64,
21180    #[doc = "X Position"]
21181    pub x: f32,
21182    #[doc = "Y Position"]
21183    pub y: f32,
21184    #[doc = "Z Position"]
21185    pub z: f32,
21186    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21189    pub q: [f32; 4],
21190    #[doc = "X linear speed"]
21191    pub vx: f32,
21192    #[doc = "Y linear speed"]
21193    pub vy: f32,
21194    #[doc = "Z linear speed"]
21195    pub vz: f32,
21196    #[doc = "Roll angular speed"]
21197    pub rollspeed: f32,
21198    #[doc = "Pitch angular speed"]
21199    pub pitchspeed: f32,
21200    #[doc = "Yaw angular speed"]
21201    pub yawspeed: f32,
21202    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21203    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21204    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21205    pub pose_covariance: [f32; 21],
21206    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21207    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21208    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21209    pub velocity_covariance: [f32; 21],
21210    #[doc = "Coordinate frame of reference for the pose data."]
21211    pub frame_id: MavFrame,
21212    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21213    pub child_frame_id: MavFrame,
21214    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21216    pub reset_counter: u8,
21217    #[doc = "Type of estimator that is providing the odometry."]
21218    #[cfg_attr(feature = "serde", serde(default))]
21219    pub estimator_type: MavEstimatorType,
21220    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21222    pub quality: i8,
21223}
21224impl ODOMETRY_DATA {
21225    pub const ENCODED_LEN: usize = 233usize;
21226    pub const DEFAULT: Self = Self {
21227        time_usec: 0_u64,
21228        x: 0.0_f32,
21229        y: 0.0_f32,
21230        z: 0.0_f32,
21231        q: [0.0_f32; 4usize],
21232        vx: 0.0_f32,
21233        vy: 0.0_f32,
21234        vz: 0.0_f32,
21235        rollspeed: 0.0_f32,
21236        pitchspeed: 0.0_f32,
21237        yawspeed: 0.0_f32,
21238        pose_covariance: [0.0_f32; 21usize],
21239        velocity_covariance: [0.0_f32; 21usize],
21240        frame_id: MavFrame::DEFAULT,
21241        child_frame_id: MavFrame::DEFAULT,
21242        reset_counter: 0_u8,
21243        estimator_type: MavEstimatorType::DEFAULT,
21244        quality: 0_i8,
21245    };
21246    #[cfg(feature = "arbitrary")]
21247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21248        use arbitrary::{Arbitrary, Unstructured};
21249        let mut buf = [0u8; 1024];
21250        rng.fill_bytes(&mut buf);
21251        let mut unstructured = Unstructured::new(&buf);
21252        Self::arbitrary(&mut unstructured).unwrap_or_default()
21253    }
21254}
21255impl Default for ODOMETRY_DATA {
21256    fn default() -> Self {
21257        Self::DEFAULT.clone()
21258    }
21259}
21260impl MessageData for ODOMETRY_DATA {
21261    type Message = MavMessage;
21262    const ID: u32 = 331u32;
21263    const NAME: &'static str = "ODOMETRY";
21264    const EXTRA_CRC: u8 = 91u8;
21265    const ENCODED_LEN: usize = 233usize;
21266    fn deser(
21267        _version: MavlinkVersion,
21268        __input: &[u8],
21269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21270        let avail_len = __input.len();
21271        let mut payload_buf = [0; Self::ENCODED_LEN];
21272        let mut buf = if avail_len < Self::ENCODED_LEN {
21273            payload_buf[0..avail_len].copy_from_slice(__input);
21274            Bytes::new(&payload_buf)
21275        } else {
21276            Bytes::new(__input)
21277        };
21278        let mut __struct = Self::default();
21279        __struct.time_usec = buf.get_u64_le();
21280        __struct.x = buf.get_f32_le();
21281        __struct.y = buf.get_f32_le();
21282        __struct.z = buf.get_f32_le();
21283        for v in &mut __struct.q {
21284            let val = buf.get_f32_le();
21285            *v = val;
21286        }
21287        __struct.vx = buf.get_f32_le();
21288        __struct.vy = buf.get_f32_le();
21289        __struct.vz = buf.get_f32_le();
21290        __struct.rollspeed = buf.get_f32_le();
21291        __struct.pitchspeed = buf.get_f32_le();
21292        __struct.yawspeed = buf.get_f32_le();
21293        for v in &mut __struct.pose_covariance {
21294            let val = buf.get_f32_le();
21295            *v = val;
21296        }
21297        for v in &mut __struct.velocity_covariance {
21298            let val = buf.get_f32_le();
21299            *v = val;
21300        }
21301        let tmp = buf.get_u8();
21302        __struct.frame_id =
21303            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21304                enum_type: "MavFrame",
21305                value: tmp as u32,
21306            })?;
21307        let tmp = buf.get_u8();
21308        __struct.child_frame_id =
21309            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21310                enum_type: "MavFrame",
21311                value: tmp as u32,
21312            })?;
21313        __struct.reset_counter = buf.get_u8();
21314        let tmp = buf.get_u8();
21315        __struct.estimator_type =
21316            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21317                enum_type: "MavEstimatorType",
21318                value: tmp as u32,
21319            })?;
21320        __struct.quality = buf.get_i8();
21321        Ok(__struct)
21322    }
21323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21324        let mut __tmp = BytesMut::new(bytes);
21325        #[allow(clippy::absurd_extreme_comparisons)]
21326        #[allow(unused_comparisons)]
21327        if __tmp.remaining() < Self::ENCODED_LEN {
21328            panic!(
21329                "buffer is too small (need {} bytes, but got {})",
21330                Self::ENCODED_LEN,
21331                __tmp.remaining(),
21332            )
21333        }
21334        __tmp.put_u64_le(self.time_usec);
21335        __tmp.put_f32_le(self.x);
21336        __tmp.put_f32_le(self.y);
21337        __tmp.put_f32_le(self.z);
21338        for val in &self.q {
21339            __tmp.put_f32_le(*val);
21340        }
21341        __tmp.put_f32_le(self.vx);
21342        __tmp.put_f32_le(self.vy);
21343        __tmp.put_f32_le(self.vz);
21344        __tmp.put_f32_le(self.rollspeed);
21345        __tmp.put_f32_le(self.pitchspeed);
21346        __tmp.put_f32_le(self.yawspeed);
21347        for val in &self.pose_covariance {
21348            __tmp.put_f32_le(*val);
21349        }
21350        for val in &self.velocity_covariance {
21351            __tmp.put_f32_le(*val);
21352        }
21353        __tmp.put_u8(self.frame_id as u8);
21354        __tmp.put_u8(self.child_frame_id as u8);
21355        if matches!(version, MavlinkVersion::V2) {
21356            __tmp.put_u8(self.reset_counter);
21357            __tmp.put_u8(self.estimator_type as u8);
21358            __tmp.put_i8(self.quality);
21359            let len = __tmp.len();
21360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21361        } else {
21362            __tmp.len()
21363        }
21364    }
21365}
21366#[doc = "Hardware status sent by an onboard computer."]
21367#[doc = ""]
21368#[doc = "ID: 390"]
21369#[derive(Debug, Clone, PartialEq)]
21370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21372#[cfg_attr(feature = "ts", derive(TS))]
21373#[cfg_attr(feature = "ts", ts(export))]
21374pub struct ONBOARD_COMPUTER_STATUS_DATA {
21375    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21376    pub time_usec: u64,
21377    #[doc = "Time since system boot."]
21378    pub uptime: u32,
21379    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21380    pub ram_usage: u32,
21381    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21382    pub ram_total: u32,
21383    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21385    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21386    pub storage_type: [u32; 4],
21387    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21388    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21389    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21390    pub storage_usage: [u32; 4],
21391    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21392    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21393    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21394    pub storage_total: [u32; 4],
21395    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21397    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21398    pub link_type: [u32; 6],
21399    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21400    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21401    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21402    pub link_tx_rate: [u32; 6],
21403    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21404    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21405    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21406    pub link_rx_rate: [u32; 6],
21407    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21408    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21409    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21410    pub link_tx_max: [u32; 6],
21411    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21412    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21413    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21414    pub link_rx_max: [u32; 6],
21415    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21416    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21417    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21418    pub fan_speed: [i16; 4],
21419    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21420    pub mavtype: u8,
21421    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21422    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21423    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21424    pub cpu_cores: [u8; 8],
21425    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21426    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21427    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21428    pub cpu_combined: [u8; 10],
21429    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21430    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21431    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21432    pub gpu_cores: [u8; 4],
21433    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21434    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21435    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21436    pub gpu_combined: [u8; 10],
21437    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21438    pub temperature_board: i8,
21439    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21442    pub temperature_core: [i8; 8],
21443}
21444impl ONBOARD_COMPUTER_STATUS_DATA {
21445    pub const ENCODED_LEN: usize = 238usize;
21446    pub const DEFAULT: Self = Self {
21447        time_usec: 0_u64,
21448        uptime: 0_u32,
21449        ram_usage: 0_u32,
21450        ram_total: 0_u32,
21451        storage_type: [0_u32; 4usize],
21452        storage_usage: [0_u32; 4usize],
21453        storage_total: [0_u32; 4usize],
21454        link_type: [0_u32; 6usize],
21455        link_tx_rate: [0_u32; 6usize],
21456        link_rx_rate: [0_u32; 6usize],
21457        link_tx_max: [0_u32; 6usize],
21458        link_rx_max: [0_u32; 6usize],
21459        fan_speed: [0_i16; 4usize],
21460        mavtype: 0_u8,
21461        cpu_cores: [0_u8; 8usize],
21462        cpu_combined: [0_u8; 10usize],
21463        gpu_cores: [0_u8; 4usize],
21464        gpu_combined: [0_u8; 10usize],
21465        temperature_board: 0_i8,
21466        temperature_core: [0_i8; 8usize],
21467    };
21468    #[cfg(feature = "arbitrary")]
21469    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21470        use arbitrary::{Arbitrary, Unstructured};
21471        let mut buf = [0u8; 1024];
21472        rng.fill_bytes(&mut buf);
21473        let mut unstructured = Unstructured::new(&buf);
21474        Self::arbitrary(&mut unstructured).unwrap_or_default()
21475    }
21476}
21477impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21478    fn default() -> Self {
21479        Self::DEFAULT.clone()
21480    }
21481}
21482impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21483    type Message = MavMessage;
21484    const ID: u32 = 390u32;
21485    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21486    const EXTRA_CRC: u8 = 156u8;
21487    const ENCODED_LEN: usize = 238usize;
21488    fn deser(
21489        _version: MavlinkVersion,
21490        __input: &[u8],
21491    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21492        let avail_len = __input.len();
21493        let mut payload_buf = [0; Self::ENCODED_LEN];
21494        let mut buf = if avail_len < Self::ENCODED_LEN {
21495            payload_buf[0..avail_len].copy_from_slice(__input);
21496            Bytes::new(&payload_buf)
21497        } else {
21498            Bytes::new(__input)
21499        };
21500        let mut __struct = Self::default();
21501        __struct.time_usec = buf.get_u64_le();
21502        __struct.uptime = buf.get_u32_le();
21503        __struct.ram_usage = buf.get_u32_le();
21504        __struct.ram_total = buf.get_u32_le();
21505        for v in &mut __struct.storage_type {
21506            let val = buf.get_u32_le();
21507            *v = val;
21508        }
21509        for v in &mut __struct.storage_usage {
21510            let val = buf.get_u32_le();
21511            *v = val;
21512        }
21513        for v in &mut __struct.storage_total {
21514            let val = buf.get_u32_le();
21515            *v = val;
21516        }
21517        for v in &mut __struct.link_type {
21518            let val = buf.get_u32_le();
21519            *v = val;
21520        }
21521        for v in &mut __struct.link_tx_rate {
21522            let val = buf.get_u32_le();
21523            *v = val;
21524        }
21525        for v in &mut __struct.link_rx_rate {
21526            let val = buf.get_u32_le();
21527            *v = val;
21528        }
21529        for v in &mut __struct.link_tx_max {
21530            let val = buf.get_u32_le();
21531            *v = val;
21532        }
21533        for v in &mut __struct.link_rx_max {
21534            let val = buf.get_u32_le();
21535            *v = val;
21536        }
21537        for v in &mut __struct.fan_speed {
21538            let val = buf.get_i16_le();
21539            *v = val;
21540        }
21541        __struct.mavtype = buf.get_u8();
21542        for v in &mut __struct.cpu_cores {
21543            let val = buf.get_u8();
21544            *v = val;
21545        }
21546        for v in &mut __struct.cpu_combined {
21547            let val = buf.get_u8();
21548            *v = val;
21549        }
21550        for v in &mut __struct.gpu_cores {
21551            let val = buf.get_u8();
21552            *v = val;
21553        }
21554        for v in &mut __struct.gpu_combined {
21555            let val = buf.get_u8();
21556            *v = val;
21557        }
21558        __struct.temperature_board = buf.get_i8();
21559        for v in &mut __struct.temperature_core {
21560            let val = buf.get_i8();
21561            *v = val;
21562        }
21563        Ok(__struct)
21564    }
21565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21566        let mut __tmp = BytesMut::new(bytes);
21567        #[allow(clippy::absurd_extreme_comparisons)]
21568        #[allow(unused_comparisons)]
21569        if __tmp.remaining() < Self::ENCODED_LEN {
21570            panic!(
21571                "buffer is too small (need {} bytes, but got {})",
21572                Self::ENCODED_LEN,
21573                __tmp.remaining(),
21574            )
21575        }
21576        __tmp.put_u64_le(self.time_usec);
21577        __tmp.put_u32_le(self.uptime);
21578        __tmp.put_u32_le(self.ram_usage);
21579        __tmp.put_u32_le(self.ram_total);
21580        for val in &self.storage_type {
21581            __tmp.put_u32_le(*val);
21582        }
21583        for val in &self.storage_usage {
21584            __tmp.put_u32_le(*val);
21585        }
21586        for val in &self.storage_total {
21587            __tmp.put_u32_le(*val);
21588        }
21589        for val in &self.link_type {
21590            __tmp.put_u32_le(*val);
21591        }
21592        for val in &self.link_tx_rate {
21593            __tmp.put_u32_le(*val);
21594        }
21595        for val in &self.link_rx_rate {
21596            __tmp.put_u32_le(*val);
21597        }
21598        for val in &self.link_tx_max {
21599            __tmp.put_u32_le(*val);
21600        }
21601        for val in &self.link_rx_max {
21602            __tmp.put_u32_le(*val);
21603        }
21604        for val in &self.fan_speed {
21605            __tmp.put_i16_le(*val);
21606        }
21607        __tmp.put_u8(self.mavtype);
21608        for val in &self.cpu_cores {
21609            __tmp.put_u8(*val);
21610        }
21611        for val in &self.cpu_combined {
21612            __tmp.put_u8(*val);
21613        }
21614        for val in &self.gpu_cores {
21615            __tmp.put_u8(*val);
21616        }
21617        for val in &self.gpu_combined {
21618            __tmp.put_u8(*val);
21619        }
21620        __tmp.put_i8(self.temperature_board);
21621        for val in &self.temperature_core {
21622            __tmp.put_i8(*val);
21623        }
21624        if matches!(version, MavlinkVersion::V2) {
21625            let len = __tmp.len();
21626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21627        } else {
21628            __tmp.len()
21629        }
21630    }
21631}
21632#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21633#[doc = ""]
21634#[doc = "ID: 12918"]
21635#[derive(Debug, Clone, PartialEq)]
21636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21638#[cfg_attr(feature = "ts", derive(TS))]
21639#[cfg_attr(feature = "ts", ts(export))]
21640pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21641    #[doc = "Status level indicating if arming is allowed."]
21642    pub status: MavOdidArmStatus,
21643    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21644    #[cfg_attr(
21645        feature = "serde",
21646        serde(
21647            serialize_with = "crate::nulstr::serialize::<_, 50>",
21648            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
21649        )
21650    )]
21651    #[cfg_attr(feature = "ts", ts(type = "string"))]
21652    pub error: [u8; 50],
21653}
21654impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21655    pub const ENCODED_LEN: usize = 51usize;
21656    pub const DEFAULT: Self = Self {
21657        status: MavOdidArmStatus::DEFAULT,
21658        error: [0_u8; 50usize],
21659    };
21660    #[cfg(feature = "arbitrary")]
21661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21662        use arbitrary::{Arbitrary, Unstructured};
21663        let mut buf = [0u8; 1024];
21664        rng.fill_bytes(&mut buf);
21665        let mut unstructured = Unstructured::new(&buf);
21666        Self::arbitrary(&mut unstructured).unwrap_or_default()
21667    }
21668}
21669impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21670    fn default() -> Self {
21671        Self::DEFAULT.clone()
21672    }
21673}
21674impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21675    type Message = MavMessage;
21676    const ID: u32 = 12918u32;
21677    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21678    const EXTRA_CRC: u8 = 139u8;
21679    const ENCODED_LEN: usize = 51usize;
21680    fn deser(
21681        _version: MavlinkVersion,
21682        __input: &[u8],
21683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21684        let avail_len = __input.len();
21685        let mut payload_buf = [0; Self::ENCODED_LEN];
21686        let mut buf = if avail_len < Self::ENCODED_LEN {
21687            payload_buf[0..avail_len].copy_from_slice(__input);
21688            Bytes::new(&payload_buf)
21689        } else {
21690            Bytes::new(__input)
21691        };
21692        let mut __struct = Self::default();
21693        let tmp = buf.get_u8();
21694        __struct.status =
21695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21696                enum_type: "MavOdidArmStatus",
21697                value: tmp as u32,
21698            })?;
21699        for v in &mut __struct.error {
21700            let val = buf.get_u8();
21701            *v = val;
21702        }
21703        Ok(__struct)
21704    }
21705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21706        let mut __tmp = BytesMut::new(bytes);
21707        #[allow(clippy::absurd_extreme_comparisons)]
21708        #[allow(unused_comparisons)]
21709        if __tmp.remaining() < Self::ENCODED_LEN {
21710            panic!(
21711                "buffer is too small (need {} bytes, but got {})",
21712                Self::ENCODED_LEN,
21713                __tmp.remaining(),
21714            )
21715        }
21716        __tmp.put_u8(self.status as u8);
21717        for val in &self.error {
21718            __tmp.put_u8(*val);
21719        }
21720        if matches!(version, MavlinkVersion::V2) {
21721            let len = __tmp.len();
21722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21723        } else {
21724            __tmp.len()
21725        }
21726    }
21727}
21728#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21729#[doc = ""]
21730#[doc = "ID: 12902"]
21731#[derive(Debug, Clone, PartialEq)]
21732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21734#[cfg_attr(feature = "ts", derive(TS))]
21735#[cfg_attr(feature = "ts", ts(export))]
21736pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21737    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21738    pub timestamp: u32,
21739    #[doc = "System ID (0 for broadcast)."]
21740    pub target_system: u8,
21741    #[doc = "Component ID (0 for broadcast)."]
21742    pub target_component: u8,
21743    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21746    pub id_or_mac: [u8; 20],
21747    #[doc = "Indicates the type of authentication."]
21748    pub authentication_type: MavOdidAuthType,
21749    #[doc = "Allowed range is 0 - 15."]
21750    pub data_page: u8,
21751    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21752    pub last_page_index: u8,
21753    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21754    pub length: u8,
21755    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21756    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21757    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21758    pub authentication_data: [u8; 23],
21759}
21760impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21761    pub const ENCODED_LEN: usize = 53usize;
21762    pub const DEFAULT: Self = Self {
21763        timestamp: 0_u32,
21764        target_system: 0_u8,
21765        target_component: 0_u8,
21766        id_or_mac: [0_u8; 20usize],
21767        authentication_type: MavOdidAuthType::DEFAULT,
21768        data_page: 0_u8,
21769        last_page_index: 0_u8,
21770        length: 0_u8,
21771        authentication_data: [0_u8; 23usize],
21772    };
21773    #[cfg(feature = "arbitrary")]
21774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21775        use arbitrary::{Arbitrary, Unstructured};
21776        let mut buf = [0u8; 1024];
21777        rng.fill_bytes(&mut buf);
21778        let mut unstructured = Unstructured::new(&buf);
21779        Self::arbitrary(&mut unstructured).unwrap_or_default()
21780    }
21781}
21782impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21783    fn default() -> Self {
21784        Self::DEFAULT.clone()
21785    }
21786}
21787impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21788    type Message = MavMessage;
21789    const ID: u32 = 12902u32;
21790    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21791    const EXTRA_CRC: u8 = 140u8;
21792    const ENCODED_LEN: usize = 53usize;
21793    fn deser(
21794        _version: MavlinkVersion,
21795        __input: &[u8],
21796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21797        let avail_len = __input.len();
21798        let mut payload_buf = [0; Self::ENCODED_LEN];
21799        let mut buf = if avail_len < Self::ENCODED_LEN {
21800            payload_buf[0..avail_len].copy_from_slice(__input);
21801            Bytes::new(&payload_buf)
21802        } else {
21803            Bytes::new(__input)
21804        };
21805        let mut __struct = Self::default();
21806        __struct.timestamp = buf.get_u32_le();
21807        __struct.target_system = buf.get_u8();
21808        __struct.target_component = buf.get_u8();
21809        for v in &mut __struct.id_or_mac {
21810            let val = buf.get_u8();
21811            *v = val;
21812        }
21813        let tmp = buf.get_u8();
21814        __struct.authentication_type =
21815            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21816                enum_type: "MavOdidAuthType",
21817                value: tmp as u32,
21818            })?;
21819        __struct.data_page = buf.get_u8();
21820        __struct.last_page_index = buf.get_u8();
21821        __struct.length = buf.get_u8();
21822        for v in &mut __struct.authentication_data {
21823            let val = buf.get_u8();
21824            *v = val;
21825        }
21826        Ok(__struct)
21827    }
21828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21829        let mut __tmp = BytesMut::new(bytes);
21830        #[allow(clippy::absurd_extreme_comparisons)]
21831        #[allow(unused_comparisons)]
21832        if __tmp.remaining() < Self::ENCODED_LEN {
21833            panic!(
21834                "buffer is too small (need {} bytes, but got {})",
21835                Self::ENCODED_LEN,
21836                __tmp.remaining(),
21837            )
21838        }
21839        __tmp.put_u32_le(self.timestamp);
21840        __tmp.put_u8(self.target_system);
21841        __tmp.put_u8(self.target_component);
21842        for val in &self.id_or_mac {
21843            __tmp.put_u8(*val);
21844        }
21845        __tmp.put_u8(self.authentication_type as u8);
21846        __tmp.put_u8(self.data_page);
21847        __tmp.put_u8(self.last_page_index);
21848        __tmp.put_u8(self.length);
21849        for val in &self.authentication_data {
21850            __tmp.put_u8(*val);
21851        }
21852        if matches!(version, MavlinkVersion::V2) {
21853            let len = __tmp.len();
21854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21855        } else {
21856            __tmp.len()
21857        }
21858    }
21859}
21860#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21861#[doc = ""]
21862#[doc = "ID: 12900"]
21863#[derive(Debug, Clone, PartialEq)]
21864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21866#[cfg_attr(feature = "ts", derive(TS))]
21867#[cfg_attr(feature = "ts", ts(export))]
21868pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21869    #[doc = "System ID (0 for broadcast)."]
21870    pub target_system: u8,
21871    #[doc = "Component ID (0 for broadcast)."]
21872    pub target_component: u8,
21873    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21875    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21876    pub id_or_mac: [u8; 20],
21877    #[doc = "Indicates the format for the uas_id field of this message."]
21878    pub id_type: MavOdidIdType,
21879    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21880    pub ua_type: MavOdidUaType,
21881    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21883    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21884    pub uas_id: [u8; 20],
21885}
21886impl OPEN_DRONE_ID_BASIC_ID_DATA {
21887    pub const ENCODED_LEN: usize = 44usize;
21888    pub const DEFAULT: Self = Self {
21889        target_system: 0_u8,
21890        target_component: 0_u8,
21891        id_or_mac: [0_u8; 20usize],
21892        id_type: MavOdidIdType::DEFAULT,
21893        ua_type: MavOdidUaType::DEFAULT,
21894        uas_id: [0_u8; 20usize],
21895    };
21896    #[cfg(feature = "arbitrary")]
21897    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21898        use arbitrary::{Arbitrary, Unstructured};
21899        let mut buf = [0u8; 1024];
21900        rng.fill_bytes(&mut buf);
21901        let mut unstructured = Unstructured::new(&buf);
21902        Self::arbitrary(&mut unstructured).unwrap_or_default()
21903    }
21904}
21905impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21906    fn default() -> Self {
21907        Self::DEFAULT.clone()
21908    }
21909}
21910impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21911    type Message = MavMessage;
21912    const ID: u32 = 12900u32;
21913    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21914    const EXTRA_CRC: u8 = 114u8;
21915    const ENCODED_LEN: usize = 44usize;
21916    fn deser(
21917        _version: MavlinkVersion,
21918        __input: &[u8],
21919    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21920        let avail_len = __input.len();
21921        let mut payload_buf = [0; Self::ENCODED_LEN];
21922        let mut buf = if avail_len < Self::ENCODED_LEN {
21923            payload_buf[0..avail_len].copy_from_slice(__input);
21924            Bytes::new(&payload_buf)
21925        } else {
21926            Bytes::new(__input)
21927        };
21928        let mut __struct = Self::default();
21929        __struct.target_system = buf.get_u8();
21930        __struct.target_component = buf.get_u8();
21931        for v in &mut __struct.id_or_mac {
21932            let val = buf.get_u8();
21933            *v = val;
21934        }
21935        let tmp = buf.get_u8();
21936        __struct.id_type =
21937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21938                enum_type: "MavOdidIdType",
21939                value: tmp as u32,
21940            })?;
21941        let tmp = buf.get_u8();
21942        __struct.ua_type =
21943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21944                enum_type: "MavOdidUaType",
21945                value: tmp as u32,
21946            })?;
21947        for v in &mut __struct.uas_id {
21948            let val = buf.get_u8();
21949            *v = val;
21950        }
21951        Ok(__struct)
21952    }
21953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21954        let mut __tmp = BytesMut::new(bytes);
21955        #[allow(clippy::absurd_extreme_comparisons)]
21956        #[allow(unused_comparisons)]
21957        if __tmp.remaining() < Self::ENCODED_LEN {
21958            panic!(
21959                "buffer is too small (need {} bytes, but got {})",
21960                Self::ENCODED_LEN,
21961                __tmp.remaining(),
21962            )
21963        }
21964        __tmp.put_u8(self.target_system);
21965        __tmp.put_u8(self.target_component);
21966        for val in &self.id_or_mac {
21967            __tmp.put_u8(*val);
21968        }
21969        __tmp.put_u8(self.id_type as u8);
21970        __tmp.put_u8(self.ua_type as u8);
21971        for val in &self.uas_id {
21972            __tmp.put_u8(*val);
21973        }
21974        if matches!(version, MavlinkVersion::V2) {
21975            let len = __tmp.len();
21976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21977        } else {
21978            __tmp.len()
21979        }
21980    }
21981}
21982#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21983#[doc = ""]
21984#[doc = "ID: 12901"]
21985#[derive(Debug, Clone, PartialEq)]
21986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21988#[cfg_attr(feature = "ts", derive(TS))]
21989#[cfg_attr(feature = "ts", ts(export))]
21990pub struct OPEN_DRONE_ID_LOCATION_DATA {
21991    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21992    pub latitude: i32,
21993    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21994    pub longitude: i32,
21995    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21996    pub altitude_barometric: f32,
21997    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21998    pub altitude_geodetic: f32,
21999    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22000    pub height: f32,
22001    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22002    pub timestamp: f32,
22003    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22004    pub direction: u16,
22005    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22006    pub speed_horizontal: u16,
22007    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22008    pub speed_vertical: i16,
22009    #[doc = "System ID (0 for broadcast)."]
22010    pub target_system: u8,
22011    #[doc = "Component ID (0 for broadcast)."]
22012    pub target_component: u8,
22013    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22015    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22016    pub id_or_mac: [u8; 20],
22017    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22018    pub status: MavOdidStatus,
22019    #[doc = "Indicates the reference point for the height field."]
22020    pub height_reference: MavOdidHeightRef,
22021    #[doc = "The accuracy of the horizontal position."]
22022    pub horizontal_accuracy: MavOdidHorAcc,
22023    #[doc = "The accuracy of the vertical position."]
22024    pub vertical_accuracy: MavOdidVerAcc,
22025    #[doc = "The accuracy of the barometric altitude."]
22026    pub barometer_accuracy: MavOdidVerAcc,
22027    #[doc = "The accuracy of the horizontal and vertical speed."]
22028    pub speed_accuracy: MavOdidSpeedAcc,
22029    #[doc = "The accuracy of the timestamps."]
22030    pub timestamp_accuracy: MavOdidTimeAcc,
22031}
22032impl OPEN_DRONE_ID_LOCATION_DATA {
22033    pub const ENCODED_LEN: usize = 59usize;
22034    pub const DEFAULT: Self = Self {
22035        latitude: 0_i32,
22036        longitude: 0_i32,
22037        altitude_barometric: 0.0_f32,
22038        altitude_geodetic: 0.0_f32,
22039        height: 0.0_f32,
22040        timestamp: 0.0_f32,
22041        direction: 0_u16,
22042        speed_horizontal: 0_u16,
22043        speed_vertical: 0_i16,
22044        target_system: 0_u8,
22045        target_component: 0_u8,
22046        id_or_mac: [0_u8; 20usize],
22047        status: MavOdidStatus::DEFAULT,
22048        height_reference: MavOdidHeightRef::DEFAULT,
22049        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22050        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22051        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22052        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22053        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22054    };
22055    #[cfg(feature = "arbitrary")]
22056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22057        use arbitrary::{Arbitrary, Unstructured};
22058        let mut buf = [0u8; 1024];
22059        rng.fill_bytes(&mut buf);
22060        let mut unstructured = Unstructured::new(&buf);
22061        Self::arbitrary(&mut unstructured).unwrap_or_default()
22062    }
22063}
22064impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22065    fn default() -> Self {
22066        Self::DEFAULT.clone()
22067    }
22068}
22069impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22070    type Message = MavMessage;
22071    const ID: u32 = 12901u32;
22072    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22073    const EXTRA_CRC: u8 = 254u8;
22074    const ENCODED_LEN: usize = 59usize;
22075    fn deser(
22076        _version: MavlinkVersion,
22077        __input: &[u8],
22078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22079        let avail_len = __input.len();
22080        let mut payload_buf = [0; Self::ENCODED_LEN];
22081        let mut buf = if avail_len < Self::ENCODED_LEN {
22082            payload_buf[0..avail_len].copy_from_slice(__input);
22083            Bytes::new(&payload_buf)
22084        } else {
22085            Bytes::new(__input)
22086        };
22087        let mut __struct = Self::default();
22088        __struct.latitude = buf.get_i32_le();
22089        __struct.longitude = buf.get_i32_le();
22090        __struct.altitude_barometric = buf.get_f32_le();
22091        __struct.altitude_geodetic = buf.get_f32_le();
22092        __struct.height = buf.get_f32_le();
22093        __struct.timestamp = buf.get_f32_le();
22094        __struct.direction = buf.get_u16_le();
22095        __struct.speed_horizontal = buf.get_u16_le();
22096        __struct.speed_vertical = buf.get_i16_le();
22097        __struct.target_system = buf.get_u8();
22098        __struct.target_component = buf.get_u8();
22099        for v in &mut __struct.id_or_mac {
22100            let val = buf.get_u8();
22101            *v = val;
22102        }
22103        let tmp = buf.get_u8();
22104        __struct.status =
22105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22106                enum_type: "MavOdidStatus",
22107                value: tmp as u32,
22108            })?;
22109        let tmp = buf.get_u8();
22110        __struct.height_reference =
22111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22112                enum_type: "MavOdidHeightRef",
22113                value: tmp as u32,
22114            })?;
22115        let tmp = buf.get_u8();
22116        __struct.horizontal_accuracy =
22117            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22118                enum_type: "MavOdidHorAcc",
22119                value: tmp as u32,
22120            })?;
22121        let tmp = buf.get_u8();
22122        __struct.vertical_accuracy =
22123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22124                enum_type: "MavOdidVerAcc",
22125                value: tmp as u32,
22126            })?;
22127        let tmp = buf.get_u8();
22128        __struct.barometer_accuracy =
22129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22130                enum_type: "MavOdidVerAcc",
22131                value: tmp as u32,
22132            })?;
22133        let tmp = buf.get_u8();
22134        __struct.speed_accuracy =
22135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22136                enum_type: "MavOdidSpeedAcc",
22137                value: tmp as u32,
22138            })?;
22139        let tmp = buf.get_u8();
22140        __struct.timestamp_accuracy =
22141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22142                enum_type: "MavOdidTimeAcc",
22143                value: tmp as u32,
22144            })?;
22145        Ok(__struct)
22146    }
22147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22148        let mut __tmp = BytesMut::new(bytes);
22149        #[allow(clippy::absurd_extreme_comparisons)]
22150        #[allow(unused_comparisons)]
22151        if __tmp.remaining() < Self::ENCODED_LEN {
22152            panic!(
22153                "buffer is too small (need {} bytes, but got {})",
22154                Self::ENCODED_LEN,
22155                __tmp.remaining(),
22156            )
22157        }
22158        __tmp.put_i32_le(self.latitude);
22159        __tmp.put_i32_le(self.longitude);
22160        __tmp.put_f32_le(self.altitude_barometric);
22161        __tmp.put_f32_le(self.altitude_geodetic);
22162        __tmp.put_f32_le(self.height);
22163        __tmp.put_f32_le(self.timestamp);
22164        __tmp.put_u16_le(self.direction);
22165        __tmp.put_u16_le(self.speed_horizontal);
22166        __tmp.put_i16_le(self.speed_vertical);
22167        __tmp.put_u8(self.target_system);
22168        __tmp.put_u8(self.target_component);
22169        for val in &self.id_or_mac {
22170            __tmp.put_u8(*val);
22171        }
22172        __tmp.put_u8(self.status as u8);
22173        __tmp.put_u8(self.height_reference as u8);
22174        __tmp.put_u8(self.horizontal_accuracy as u8);
22175        __tmp.put_u8(self.vertical_accuracy as u8);
22176        __tmp.put_u8(self.barometer_accuracy as u8);
22177        __tmp.put_u8(self.speed_accuracy as u8);
22178        __tmp.put_u8(self.timestamp_accuracy as u8);
22179        if matches!(version, MavlinkVersion::V2) {
22180            let len = __tmp.len();
22181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22182        } else {
22183            __tmp.len()
22184        }
22185    }
22186}
22187#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22188#[doc = ""]
22189#[doc = "ID: 12915"]
22190#[derive(Debug, Clone, PartialEq)]
22191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22193#[cfg_attr(feature = "ts", derive(TS))]
22194#[cfg_attr(feature = "ts", ts(export))]
22195pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22196    #[doc = "System ID (0 for broadcast)."]
22197    pub target_system: u8,
22198    #[doc = "Component ID (0 for broadcast)."]
22199    pub target_component: u8,
22200    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22201    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22202    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22203    pub id_or_mac: [u8; 20],
22204    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22205    pub single_message_size: u8,
22206    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22207    pub msg_pack_size: u8,
22208    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22210    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22211    pub messages: [u8; 225],
22212}
22213impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22214    pub const ENCODED_LEN: usize = 249usize;
22215    pub const DEFAULT: Self = Self {
22216        target_system: 0_u8,
22217        target_component: 0_u8,
22218        id_or_mac: [0_u8; 20usize],
22219        single_message_size: 0_u8,
22220        msg_pack_size: 0_u8,
22221        messages: [0_u8; 225usize],
22222    };
22223    #[cfg(feature = "arbitrary")]
22224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22225        use arbitrary::{Arbitrary, Unstructured};
22226        let mut buf = [0u8; 1024];
22227        rng.fill_bytes(&mut buf);
22228        let mut unstructured = Unstructured::new(&buf);
22229        Self::arbitrary(&mut unstructured).unwrap_or_default()
22230    }
22231}
22232impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22233    fn default() -> Self {
22234        Self::DEFAULT.clone()
22235    }
22236}
22237impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22238    type Message = MavMessage;
22239    const ID: u32 = 12915u32;
22240    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22241    const EXTRA_CRC: u8 = 94u8;
22242    const ENCODED_LEN: usize = 249usize;
22243    fn deser(
22244        _version: MavlinkVersion,
22245        __input: &[u8],
22246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22247        let avail_len = __input.len();
22248        let mut payload_buf = [0; Self::ENCODED_LEN];
22249        let mut buf = if avail_len < Self::ENCODED_LEN {
22250            payload_buf[0..avail_len].copy_from_slice(__input);
22251            Bytes::new(&payload_buf)
22252        } else {
22253            Bytes::new(__input)
22254        };
22255        let mut __struct = Self::default();
22256        __struct.target_system = buf.get_u8();
22257        __struct.target_component = buf.get_u8();
22258        for v in &mut __struct.id_or_mac {
22259            let val = buf.get_u8();
22260            *v = val;
22261        }
22262        __struct.single_message_size = buf.get_u8();
22263        __struct.msg_pack_size = buf.get_u8();
22264        for v in &mut __struct.messages {
22265            let val = buf.get_u8();
22266            *v = val;
22267        }
22268        Ok(__struct)
22269    }
22270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22271        let mut __tmp = BytesMut::new(bytes);
22272        #[allow(clippy::absurd_extreme_comparisons)]
22273        #[allow(unused_comparisons)]
22274        if __tmp.remaining() < Self::ENCODED_LEN {
22275            panic!(
22276                "buffer is too small (need {} bytes, but got {})",
22277                Self::ENCODED_LEN,
22278                __tmp.remaining(),
22279            )
22280        }
22281        __tmp.put_u8(self.target_system);
22282        __tmp.put_u8(self.target_component);
22283        for val in &self.id_or_mac {
22284            __tmp.put_u8(*val);
22285        }
22286        __tmp.put_u8(self.single_message_size);
22287        __tmp.put_u8(self.msg_pack_size);
22288        for val in &self.messages {
22289            __tmp.put_u8(*val);
22290        }
22291        if matches!(version, MavlinkVersion::V2) {
22292            let len = __tmp.len();
22293            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22294        } else {
22295            __tmp.len()
22296        }
22297    }
22298}
22299#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22300#[doc = ""]
22301#[doc = "ID: 12905"]
22302#[derive(Debug, Clone, PartialEq)]
22303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22305#[cfg_attr(feature = "ts", derive(TS))]
22306#[cfg_attr(feature = "ts", ts(export))]
22307pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22308    #[doc = "System ID (0 for broadcast)."]
22309    pub target_system: u8,
22310    #[doc = "Component ID (0 for broadcast)."]
22311    pub target_component: u8,
22312    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22313    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22314    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22315    pub id_or_mac: [u8; 20],
22316    #[doc = "Indicates the type of the operator_id field."]
22317    pub operator_id_type: MavOdidOperatorIdType,
22318    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22319    #[cfg_attr(
22320        feature = "serde",
22321        serde(
22322            serialize_with = "crate::nulstr::serialize::<_, 20>",
22323            deserialize_with = "crate::nulstr::deserialize::<_, 20>"
22324        )
22325    )]
22326    #[cfg_attr(feature = "ts", ts(type = "string"))]
22327    pub operator_id: [u8; 20],
22328}
22329impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22330    pub const ENCODED_LEN: usize = 43usize;
22331    pub const DEFAULT: Self = Self {
22332        target_system: 0_u8,
22333        target_component: 0_u8,
22334        id_or_mac: [0_u8; 20usize],
22335        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22336        operator_id: [0_u8; 20usize],
22337    };
22338    #[cfg(feature = "arbitrary")]
22339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22340        use arbitrary::{Arbitrary, Unstructured};
22341        let mut buf = [0u8; 1024];
22342        rng.fill_bytes(&mut buf);
22343        let mut unstructured = Unstructured::new(&buf);
22344        Self::arbitrary(&mut unstructured).unwrap_or_default()
22345    }
22346}
22347impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22348    fn default() -> Self {
22349        Self::DEFAULT.clone()
22350    }
22351}
22352impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22353    type Message = MavMessage;
22354    const ID: u32 = 12905u32;
22355    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22356    const EXTRA_CRC: u8 = 49u8;
22357    const ENCODED_LEN: usize = 43usize;
22358    fn deser(
22359        _version: MavlinkVersion,
22360        __input: &[u8],
22361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22362        let avail_len = __input.len();
22363        let mut payload_buf = [0; Self::ENCODED_LEN];
22364        let mut buf = if avail_len < Self::ENCODED_LEN {
22365            payload_buf[0..avail_len].copy_from_slice(__input);
22366            Bytes::new(&payload_buf)
22367        } else {
22368            Bytes::new(__input)
22369        };
22370        let mut __struct = Self::default();
22371        __struct.target_system = buf.get_u8();
22372        __struct.target_component = buf.get_u8();
22373        for v in &mut __struct.id_or_mac {
22374            let val = buf.get_u8();
22375            *v = val;
22376        }
22377        let tmp = buf.get_u8();
22378        __struct.operator_id_type =
22379            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22380                enum_type: "MavOdidOperatorIdType",
22381                value: tmp as u32,
22382            })?;
22383        for v in &mut __struct.operator_id {
22384            let val = buf.get_u8();
22385            *v = val;
22386        }
22387        Ok(__struct)
22388    }
22389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22390        let mut __tmp = BytesMut::new(bytes);
22391        #[allow(clippy::absurd_extreme_comparisons)]
22392        #[allow(unused_comparisons)]
22393        if __tmp.remaining() < Self::ENCODED_LEN {
22394            panic!(
22395                "buffer is too small (need {} bytes, but got {})",
22396                Self::ENCODED_LEN,
22397                __tmp.remaining(),
22398            )
22399        }
22400        __tmp.put_u8(self.target_system);
22401        __tmp.put_u8(self.target_component);
22402        for val in &self.id_or_mac {
22403            __tmp.put_u8(*val);
22404        }
22405        __tmp.put_u8(self.operator_id_type as u8);
22406        for val in &self.operator_id {
22407            __tmp.put_u8(*val);
22408        }
22409        if matches!(version, MavlinkVersion::V2) {
22410            let len = __tmp.len();
22411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22412        } else {
22413            __tmp.len()
22414        }
22415    }
22416}
22417#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22418#[doc = ""]
22419#[doc = "ID: 12903"]
22420#[derive(Debug, Clone, PartialEq)]
22421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22423#[cfg_attr(feature = "ts", derive(TS))]
22424#[cfg_attr(feature = "ts", ts(export))]
22425pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22426    #[doc = "System ID (0 for broadcast)."]
22427    pub target_system: u8,
22428    #[doc = "Component ID (0 for broadcast)."]
22429    pub target_component: u8,
22430    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22431    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22432    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22433    pub id_or_mac: [u8; 20],
22434    #[doc = "Indicates the type of the description field."]
22435    pub description_type: MavOdidDescType,
22436    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22437    #[cfg_attr(
22438        feature = "serde",
22439        serde(
22440            serialize_with = "crate::nulstr::serialize::<_, 23>",
22441            deserialize_with = "crate::nulstr::deserialize::<_, 23>"
22442        )
22443    )]
22444    #[cfg_attr(feature = "ts", ts(type = "string"))]
22445    pub description: [u8; 23],
22446}
22447impl OPEN_DRONE_ID_SELF_ID_DATA {
22448    pub const ENCODED_LEN: usize = 46usize;
22449    pub const DEFAULT: Self = Self {
22450        target_system: 0_u8,
22451        target_component: 0_u8,
22452        id_or_mac: [0_u8; 20usize],
22453        description_type: MavOdidDescType::DEFAULT,
22454        description: [0_u8; 23usize],
22455    };
22456    #[cfg(feature = "arbitrary")]
22457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22458        use arbitrary::{Arbitrary, Unstructured};
22459        let mut buf = [0u8; 1024];
22460        rng.fill_bytes(&mut buf);
22461        let mut unstructured = Unstructured::new(&buf);
22462        Self::arbitrary(&mut unstructured).unwrap_or_default()
22463    }
22464}
22465impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22466    fn default() -> Self {
22467        Self::DEFAULT.clone()
22468    }
22469}
22470impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22471    type Message = MavMessage;
22472    const ID: u32 = 12903u32;
22473    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22474    const EXTRA_CRC: u8 = 249u8;
22475    const ENCODED_LEN: usize = 46usize;
22476    fn deser(
22477        _version: MavlinkVersion,
22478        __input: &[u8],
22479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22480        let avail_len = __input.len();
22481        let mut payload_buf = [0; Self::ENCODED_LEN];
22482        let mut buf = if avail_len < Self::ENCODED_LEN {
22483            payload_buf[0..avail_len].copy_from_slice(__input);
22484            Bytes::new(&payload_buf)
22485        } else {
22486            Bytes::new(__input)
22487        };
22488        let mut __struct = Self::default();
22489        __struct.target_system = buf.get_u8();
22490        __struct.target_component = buf.get_u8();
22491        for v in &mut __struct.id_or_mac {
22492            let val = buf.get_u8();
22493            *v = val;
22494        }
22495        let tmp = buf.get_u8();
22496        __struct.description_type =
22497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22498                enum_type: "MavOdidDescType",
22499                value: tmp as u32,
22500            })?;
22501        for v in &mut __struct.description {
22502            let val = buf.get_u8();
22503            *v = val;
22504        }
22505        Ok(__struct)
22506    }
22507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22508        let mut __tmp = BytesMut::new(bytes);
22509        #[allow(clippy::absurd_extreme_comparisons)]
22510        #[allow(unused_comparisons)]
22511        if __tmp.remaining() < Self::ENCODED_LEN {
22512            panic!(
22513                "buffer is too small (need {} bytes, but got {})",
22514                Self::ENCODED_LEN,
22515                __tmp.remaining(),
22516            )
22517        }
22518        __tmp.put_u8(self.target_system);
22519        __tmp.put_u8(self.target_component);
22520        for val in &self.id_or_mac {
22521            __tmp.put_u8(*val);
22522        }
22523        __tmp.put_u8(self.description_type as u8);
22524        for val in &self.description {
22525            __tmp.put_u8(*val);
22526        }
22527        if matches!(version, MavlinkVersion::V2) {
22528            let len = __tmp.len();
22529            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22530        } else {
22531            __tmp.len()
22532        }
22533    }
22534}
22535#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22536#[doc = ""]
22537#[doc = "ID: 12904"]
22538#[derive(Debug, Clone, PartialEq)]
22539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22540#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22541#[cfg_attr(feature = "ts", derive(TS))]
22542#[cfg_attr(feature = "ts", ts(export))]
22543pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22544    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22545    pub operator_latitude: i32,
22546    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22547    pub operator_longitude: i32,
22548    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22549    pub area_ceiling: f32,
22550    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22551    pub area_floor: f32,
22552    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22553    pub operator_altitude_geo: f32,
22554    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22555    pub timestamp: u32,
22556    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22557    pub area_count: u16,
22558    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22559    pub area_radius: u16,
22560    #[doc = "System ID (0 for broadcast)."]
22561    pub target_system: u8,
22562    #[doc = "Component ID (0 for broadcast)."]
22563    pub target_component: u8,
22564    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22565    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22566    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22567    pub id_or_mac: [u8; 20],
22568    #[doc = "Specifies the operator location type."]
22569    pub operator_location_type: MavOdidOperatorLocationType,
22570    #[doc = "Specifies the classification type of the UA."]
22571    pub classification_type: MavOdidClassificationType,
22572    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22573    pub category_eu: MavOdidCategoryEu,
22574    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22575    pub class_eu: MavOdidClassEu,
22576}
22577impl OPEN_DRONE_ID_SYSTEM_DATA {
22578    pub const ENCODED_LEN: usize = 54usize;
22579    pub const DEFAULT: Self = Self {
22580        operator_latitude: 0_i32,
22581        operator_longitude: 0_i32,
22582        area_ceiling: 0.0_f32,
22583        area_floor: 0.0_f32,
22584        operator_altitude_geo: 0.0_f32,
22585        timestamp: 0_u32,
22586        area_count: 0_u16,
22587        area_radius: 0_u16,
22588        target_system: 0_u8,
22589        target_component: 0_u8,
22590        id_or_mac: [0_u8; 20usize],
22591        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22592        classification_type: MavOdidClassificationType::DEFAULT,
22593        category_eu: MavOdidCategoryEu::DEFAULT,
22594        class_eu: MavOdidClassEu::DEFAULT,
22595    };
22596    #[cfg(feature = "arbitrary")]
22597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22598        use arbitrary::{Arbitrary, Unstructured};
22599        let mut buf = [0u8; 1024];
22600        rng.fill_bytes(&mut buf);
22601        let mut unstructured = Unstructured::new(&buf);
22602        Self::arbitrary(&mut unstructured).unwrap_or_default()
22603    }
22604}
22605impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22606    fn default() -> Self {
22607        Self::DEFAULT.clone()
22608    }
22609}
22610impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22611    type Message = MavMessage;
22612    const ID: u32 = 12904u32;
22613    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22614    const EXTRA_CRC: u8 = 77u8;
22615    const ENCODED_LEN: usize = 54usize;
22616    fn deser(
22617        _version: MavlinkVersion,
22618        __input: &[u8],
22619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22620        let avail_len = __input.len();
22621        let mut payload_buf = [0; Self::ENCODED_LEN];
22622        let mut buf = if avail_len < Self::ENCODED_LEN {
22623            payload_buf[0..avail_len].copy_from_slice(__input);
22624            Bytes::new(&payload_buf)
22625        } else {
22626            Bytes::new(__input)
22627        };
22628        let mut __struct = Self::default();
22629        __struct.operator_latitude = buf.get_i32_le();
22630        __struct.operator_longitude = buf.get_i32_le();
22631        __struct.area_ceiling = buf.get_f32_le();
22632        __struct.area_floor = buf.get_f32_le();
22633        __struct.operator_altitude_geo = buf.get_f32_le();
22634        __struct.timestamp = buf.get_u32_le();
22635        __struct.area_count = buf.get_u16_le();
22636        __struct.area_radius = buf.get_u16_le();
22637        __struct.target_system = buf.get_u8();
22638        __struct.target_component = buf.get_u8();
22639        for v in &mut __struct.id_or_mac {
22640            let val = buf.get_u8();
22641            *v = val;
22642        }
22643        let tmp = buf.get_u8();
22644        __struct.operator_location_type =
22645            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22646                enum_type: "MavOdidOperatorLocationType",
22647                value: tmp as u32,
22648            })?;
22649        let tmp = buf.get_u8();
22650        __struct.classification_type =
22651            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22652                enum_type: "MavOdidClassificationType",
22653                value: tmp as u32,
22654            })?;
22655        let tmp = buf.get_u8();
22656        __struct.category_eu =
22657            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22658                enum_type: "MavOdidCategoryEu",
22659                value: tmp as u32,
22660            })?;
22661        let tmp = buf.get_u8();
22662        __struct.class_eu =
22663            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22664                enum_type: "MavOdidClassEu",
22665                value: tmp as u32,
22666            })?;
22667        Ok(__struct)
22668    }
22669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22670        let mut __tmp = BytesMut::new(bytes);
22671        #[allow(clippy::absurd_extreme_comparisons)]
22672        #[allow(unused_comparisons)]
22673        if __tmp.remaining() < Self::ENCODED_LEN {
22674            panic!(
22675                "buffer is too small (need {} bytes, but got {})",
22676                Self::ENCODED_LEN,
22677                __tmp.remaining(),
22678            )
22679        }
22680        __tmp.put_i32_le(self.operator_latitude);
22681        __tmp.put_i32_le(self.operator_longitude);
22682        __tmp.put_f32_le(self.area_ceiling);
22683        __tmp.put_f32_le(self.area_floor);
22684        __tmp.put_f32_le(self.operator_altitude_geo);
22685        __tmp.put_u32_le(self.timestamp);
22686        __tmp.put_u16_le(self.area_count);
22687        __tmp.put_u16_le(self.area_radius);
22688        __tmp.put_u8(self.target_system);
22689        __tmp.put_u8(self.target_component);
22690        for val in &self.id_or_mac {
22691            __tmp.put_u8(*val);
22692        }
22693        __tmp.put_u8(self.operator_location_type as u8);
22694        __tmp.put_u8(self.classification_type as u8);
22695        __tmp.put_u8(self.category_eu as u8);
22696        __tmp.put_u8(self.class_eu as u8);
22697        if matches!(version, MavlinkVersion::V2) {
22698            let len = __tmp.len();
22699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22700        } else {
22701            __tmp.len()
22702        }
22703    }
22704}
22705#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22706#[doc = ""]
22707#[doc = "ID: 12919"]
22708#[derive(Debug, Clone, PartialEq)]
22709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22711#[cfg_attr(feature = "ts", derive(TS))]
22712#[cfg_attr(feature = "ts", ts(export))]
22713pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22714    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22715    pub operator_latitude: i32,
22716    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22717    pub operator_longitude: i32,
22718    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22719    pub operator_altitude_geo: f32,
22720    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22721    pub timestamp: u32,
22722    #[doc = "System ID (0 for broadcast)."]
22723    pub target_system: u8,
22724    #[doc = "Component ID (0 for broadcast)."]
22725    pub target_component: u8,
22726}
22727impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22728    pub const ENCODED_LEN: usize = 18usize;
22729    pub const DEFAULT: Self = Self {
22730        operator_latitude: 0_i32,
22731        operator_longitude: 0_i32,
22732        operator_altitude_geo: 0.0_f32,
22733        timestamp: 0_u32,
22734        target_system: 0_u8,
22735        target_component: 0_u8,
22736    };
22737    #[cfg(feature = "arbitrary")]
22738    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22739        use arbitrary::{Arbitrary, Unstructured};
22740        let mut buf = [0u8; 1024];
22741        rng.fill_bytes(&mut buf);
22742        let mut unstructured = Unstructured::new(&buf);
22743        Self::arbitrary(&mut unstructured).unwrap_or_default()
22744    }
22745}
22746impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22747    fn default() -> Self {
22748        Self::DEFAULT.clone()
22749    }
22750}
22751impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22752    type Message = MavMessage;
22753    const ID: u32 = 12919u32;
22754    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22755    const EXTRA_CRC: u8 = 7u8;
22756    const ENCODED_LEN: usize = 18usize;
22757    fn deser(
22758        _version: MavlinkVersion,
22759        __input: &[u8],
22760    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22761        let avail_len = __input.len();
22762        let mut payload_buf = [0; Self::ENCODED_LEN];
22763        let mut buf = if avail_len < Self::ENCODED_LEN {
22764            payload_buf[0..avail_len].copy_from_slice(__input);
22765            Bytes::new(&payload_buf)
22766        } else {
22767            Bytes::new(__input)
22768        };
22769        let mut __struct = Self::default();
22770        __struct.operator_latitude = buf.get_i32_le();
22771        __struct.operator_longitude = buf.get_i32_le();
22772        __struct.operator_altitude_geo = buf.get_f32_le();
22773        __struct.timestamp = buf.get_u32_le();
22774        __struct.target_system = buf.get_u8();
22775        __struct.target_component = buf.get_u8();
22776        Ok(__struct)
22777    }
22778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22779        let mut __tmp = BytesMut::new(bytes);
22780        #[allow(clippy::absurd_extreme_comparisons)]
22781        #[allow(unused_comparisons)]
22782        if __tmp.remaining() < Self::ENCODED_LEN {
22783            panic!(
22784                "buffer is too small (need {} bytes, but got {})",
22785                Self::ENCODED_LEN,
22786                __tmp.remaining(),
22787            )
22788        }
22789        __tmp.put_i32_le(self.operator_latitude);
22790        __tmp.put_i32_le(self.operator_longitude);
22791        __tmp.put_f32_le(self.operator_altitude_geo);
22792        __tmp.put_u32_le(self.timestamp);
22793        __tmp.put_u8(self.target_system);
22794        __tmp.put_u8(self.target_component);
22795        if matches!(version, MavlinkVersion::V2) {
22796            let len = __tmp.len();
22797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22798        } else {
22799            __tmp.len()
22800        }
22801    }
22802}
22803#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22804#[doc = ""]
22805#[doc = "ID: 100"]
22806#[derive(Debug, Clone, PartialEq)]
22807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22809#[cfg_attr(feature = "ts", derive(TS))]
22810#[cfg_attr(feature = "ts", ts(export))]
22811pub struct OPTICAL_FLOW_DATA {
22812    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22813    pub time_usec: u64,
22814    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22815    pub flow_comp_m_x: f32,
22816    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22817    pub flow_comp_m_y: f32,
22818    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22819    pub ground_distance: f32,
22820    #[doc = "Flow in x-sensor direction"]
22821    pub flow_x: i16,
22822    #[doc = "Flow in y-sensor direction"]
22823    pub flow_y: i16,
22824    #[doc = "Sensor ID"]
22825    pub sensor_id: u8,
22826    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22827    pub quality: u8,
22828    #[doc = "Flow rate about X axis"]
22829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22830    pub flow_rate_x: f32,
22831    #[doc = "Flow rate about Y axis"]
22832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22833    pub flow_rate_y: f32,
22834}
22835impl OPTICAL_FLOW_DATA {
22836    pub const ENCODED_LEN: usize = 34usize;
22837    pub const DEFAULT: Self = Self {
22838        time_usec: 0_u64,
22839        flow_comp_m_x: 0.0_f32,
22840        flow_comp_m_y: 0.0_f32,
22841        ground_distance: 0.0_f32,
22842        flow_x: 0_i16,
22843        flow_y: 0_i16,
22844        sensor_id: 0_u8,
22845        quality: 0_u8,
22846        flow_rate_x: 0.0_f32,
22847        flow_rate_y: 0.0_f32,
22848    };
22849    #[cfg(feature = "arbitrary")]
22850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22851        use arbitrary::{Arbitrary, Unstructured};
22852        let mut buf = [0u8; 1024];
22853        rng.fill_bytes(&mut buf);
22854        let mut unstructured = Unstructured::new(&buf);
22855        Self::arbitrary(&mut unstructured).unwrap_or_default()
22856    }
22857}
22858impl Default for OPTICAL_FLOW_DATA {
22859    fn default() -> Self {
22860        Self::DEFAULT.clone()
22861    }
22862}
22863impl MessageData for OPTICAL_FLOW_DATA {
22864    type Message = MavMessage;
22865    const ID: u32 = 100u32;
22866    const NAME: &'static str = "OPTICAL_FLOW";
22867    const EXTRA_CRC: u8 = 175u8;
22868    const ENCODED_LEN: usize = 34usize;
22869    fn deser(
22870        _version: MavlinkVersion,
22871        __input: &[u8],
22872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22873        let avail_len = __input.len();
22874        let mut payload_buf = [0; Self::ENCODED_LEN];
22875        let mut buf = if avail_len < Self::ENCODED_LEN {
22876            payload_buf[0..avail_len].copy_from_slice(__input);
22877            Bytes::new(&payload_buf)
22878        } else {
22879            Bytes::new(__input)
22880        };
22881        let mut __struct = Self::default();
22882        __struct.time_usec = buf.get_u64_le();
22883        __struct.flow_comp_m_x = buf.get_f32_le();
22884        __struct.flow_comp_m_y = buf.get_f32_le();
22885        __struct.ground_distance = buf.get_f32_le();
22886        __struct.flow_x = buf.get_i16_le();
22887        __struct.flow_y = buf.get_i16_le();
22888        __struct.sensor_id = buf.get_u8();
22889        __struct.quality = buf.get_u8();
22890        __struct.flow_rate_x = buf.get_f32_le();
22891        __struct.flow_rate_y = buf.get_f32_le();
22892        Ok(__struct)
22893    }
22894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22895        let mut __tmp = BytesMut::new(bytes);
22896        #[allow(clippy::absurd_extreme_comparisons)]
22897        #[allow(unused_comparisons)]
22898        if __tmp.remaining() < Self::ENCODED_LEN {
22899            panic!(
22900                "buffer is too small (need {} bytes, but got {})",
22901                Self::ENCODED_LEN,
22902                __tmp.remaining(),
22903            )
22904        }
22905        __tmp.put_u64_le(self.time_usec);
22906        __tmp.put_f32_le(self.flow_comp_m_x);
22907        __tmp.put_f32_le(self.flow_comp_m_y);
22908        __tmp.put_f32_le(self.ground_distance);
22909        __tmp.put_i16_le(self.flow_x);
22910        __tmp.put_i16_le(self.flow_y);
22911        __tmp.put_u8(self.sensor_id);
22912        __tmp.put_u8(self.quality);
22913        if matches!(version, MavlinkVersion::V2) {
22914            __tmp.put_f32_le(self.flow_rate_x);
22915            __tmp.put_f32_le(self.flow_rate_y);
22916            let len = __tmp.len();
22917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22918        } else {
22919            __tmp.len()
22920        }
22921    }
22922}
22923#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22924#[doc = ""]
22925#[doc = "ID: 106"]
22926#[derive(Debug, Clone, PartialEq)]
22927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22929#[cfg_attr(feature = "ts", derive(TS))]
22930#[cfg_attr(feature = "ts", ts(export))]
22931pub struct OPTICAL_FLOW_RAD_DATA {
22932    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22933    pub time_usec: u64,
22934    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22935    pub integration_time_us: u32,
22936    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22937    pub integrated_x: f32,
22938    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22939    pub integrated_y: f32,
22940    #[doc = "RH rotation around X axis"]
22941    pub integrated_xgyro: f32,
22942    #[doc = "RH rotation around Y axis"]
22943    pub integrated_ygyro: f32,
22944    #[doc = "RH rotation around Z axis"]
22945    pub integrated_zgyro: f32,
22946    #[doc = "Time since the distance was sampled."]
22947    pub time_delta_distance_us: u32,
22948    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22949    pub distance: f32,
22950    #[doc = "Temperature"]
22951    pub temperature: i16,
22952    #[doc = "Sensor ID"]
22953    pub sensor_id: u8,
22954    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22955    pub quality: u8,
22956}
22957impl OPTICAL_FLOW_RAD_DATA {
22958    pub const ENCODED_LEN: usize = 44usize;
22959    pub const DEFAULT: Self = Self {
22960        time_usec: 0_u64,
22961        integration_time_us: 0_u32,
22962        integrated_x: 0.0_f32,
22963        integrated_y: 0.0_f32,
22964        integrated_xgyro: 0.0_f32,
22965        integrated_ygyro: 0.0_f32,
22966        integrated_zgyro: 0.0_f32,
22967        time_delta_distance_us: 0_u32,
22968        distance: 0.0_f32,
22969        temperature: 0_i16,
22970        sensor_id: 0_u8,
22971        quality: 0_u8,
22972    };
22973    #[cfg(feature = "arbitrary")]
22974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22975        use arbitrary::{Arbitrary, Unstructured};
22976        let mut buf = [0u8; 1024];
22977        rng.fill_bytes(&mut buf);
22978        let mut unstructured = Unstructured::new(&buf);
22979        Self::arbitrary(&mut unstructured).unwrap_or_default()
22980    }
22981}
22982impl Default for OPTICAL_FLOW_RAD_DATA {
22983    fn default() -> Self {
22984        Self::DEFAULT.clone()
22985    }
22986}
22987impl MessageData for OPTICAL_FLOW_RAD_DATA {
22988    type Message = MavMessage;
22989    const ID: u32 = 106u32;
22990    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22991    const EXTRA_CRC: u8 = 138u8;
22992    const ENCODED_LEN: usize = 44usize;
22993    fn deser(
22994        _version: MavlinkVersion,
22995        __input: &[u8],
22996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22997        let avail_len = __input.len();
22998        let mut payload_buf = [0; Self::ENCODED_LEN];
22999        let mut buf = if avail_len < Self::ENCODED_LEN {
23000            payload_buf[0..avail_len].copy_from_slice(__input);
23001            Bytes::new(&payload_buf)
23002        } else {
23003            Bytes::new(__input)
23004        };
23005        let mut __struct = Self::default();
23006        __struct.time_usec = buf.get_u64_le();
23007        __struct.integration_time_us = buf.get_u32_le();
23008        __struct.integrated_x = buf.get_f32_le();
23009        __struct.integrated_y = buf.get_f32_le();
23010        __struct.integrated_xgyro = buf.get_f32_le();
23011        __struct.integrated_ygyro = buf.get_f32_le();
23012        __struct.integrated_zgyro = buf.get_f32_le();
23013        __struct.time_delta_distance_us = buf.get_u32_le();
23014        __struct.distance = buf.get_f32_le();
23015        __struct.temperature = buf.get_i16_le();
23016        __struct.sensor_id = buf.get_u8();
23017        __struct.quality = buf.get_u8();
23018        Ok(__struct)
23019    }
23020    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23021        let mut __tmp = BytesMut::new(bytes);
23022        #[allow(clippy::absurd_extreme_comparisons)]
23023        #[allow(unused_comparisons)]
23024        if __tmp.remaining() < Self::ENCODED_LEN {
23025            panic!(
23026                "buffer is too small (need {} bytes, but got {})",
23027                Self::ENCODED_LEN,
23028                __tmp.remaining(),
23029            )
23030        }
23031        __tmp.put_u64_le(self.time_usec);
23032        __tmp.put_u32_le(self.integration_time_us);
23033        __tmp.put_f32_le(self.integrated_x);
23034        __tmp.put_f32_le(self.integrated_y);
23035        __tmp.put_f32_le(self.integrated_xgyro);
23036        __tmp.put_f32_le(self.integrated_ygyro);
23037        __tmp.put_f32_le(self.integrated_zgyro);
23038        __tmp.put_u32_le(self.time_delta_distance_us);
23039        __tmp.put_f32_le(self.distance);
23040        __tmp.put_i16_le(self.temperature);
23041        __tmp.put_u8(self.sensor_id);
23042        __tmp.put_u8(self.quality);
23043        if matches!(version, MavlinkVersion::V2) {
23044            let len = __tmp.len();
23045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23046        } else {
23047            __tmp.len()
23048        }
23049    }
23050}
23051#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23052#[doc = ""]
23053#[doc = "ID: 360"]
23054#[derive(Debug, Clone, PartialEq)]
23055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23057#[cfg_attr(feature = "ts", derive(TS))]
23058#[cfg_attr(feature = "ts", ts(export))]
23059pub struct ORBIT_EXECUTION_STATUS_DATA {
23060    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23061    pub time_usec: u64,
23062    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23063    pub radius: f32,
23064    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23065    pub x: i32,
23066    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23067    pub y: i32,
23068    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23069    pub z: f32,
23070    #[doc = "The coordinate system of the fields: x, y, z."]
23071    pub frame: MavFrame,
23072}
23073impl ORBIT_EXECUTION_STATUS_DATA {
23074    pub const ENCODED_LEN: usize = 25usize;
23075    pub const DEFAULT: Self = Self {
23076        time_usec: 0_u64,
23077        radius: 0.0_f32,
23078        x: 0_i32,
23079        y: 0_i32,
23080        z: 0.0_f32,
23081        frame: MavFrame::DEFAULT,
23082    };
23083    #[cfg(feature = "arbitrary")]
23084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23085        use arbitrary::{Arbitrary, Unstructured};
23086        let mut buf = [0u8; 1024];
23087        rng.fill_bytes(&mut buf);
23088        let mut unstructured = Unstructured::new(&buf);
23089        Self::arbitrary(&mut unstructured).unwrap_or_default()
23090    }
23091}
23092impl Default for ORBIT_EXECUTION_STATUS_DATA {
23093    fn default() -> Self {
23094        Self::DEFAULT.clone()
23095    }
23096}
23097impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23098    type Message = MavMessage;
23099    const ID: u32 = 360u32;
23100    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23101    const EXTRA_CRC: u8 = 11u8;
23102    const ENCODED_LEN: usize = 25usize;
23103    fn deser(
23104        _version: MavlinkVersion,
23105        __input: &[u8],
23106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23107        let avail_len = __input.len();
23108        let mut payload_buf = [0; Self::ENCODED_LEN];
23109        let mut buf = if avail_len < Self::ENCODED_LEN {
23110            payload_buf[0..avail_len].copy_from_slice(__input);
23111            Bytes::new(&payload_buf)
23112        } else {
23113            Bytes::new(__input)
23114        };
23115        let mut __struct = Self::default();
23116        __struct.time_usec = buf.get_u64_le();
23117        __struct.radius = buf.get_f32_le();
23118        __struct.x = buf.get_i32_le();
23119        __struct.y = buf.get_i32_le();
23120        __struct.z = buf.get_f32_le();
23121        let tmp = buf.get_u8();
23122        __struct.frame =
23123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23124                enum_type: "MavFrame",
23125                value: tmp as u32,
23126            })?;
23127        Ok(__struct)
23128    }
23129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23130        let mut __tmp = BytesMut::new(bytes);
23131        #[allow(clippy::absurd_extreme_comparisons)]
23132        #[allow(unused_comparisons)]
23133        if __tmp.remaining() < Self::ENCODED_LEN {
23134            panic!(
23135                "buffer is too small (need {} bytes, but got {})",
23136                Self::ENCODED_LEN,
23137                __tmp.remaining(),
23138            )
23139        }
23140        __tmp.put_u64_le(self.time_usec);
23141        __tmp.put_f32_le(self.radius);
23142        __tmp.put_i32_le(self.x);
23143        __tmp.put_i32_le(self.y);
23144        __tmp.put_f32_le(self.z);
23145        __tmp.put_u8(self.frame as u8);
23146        if matches!(version, MavlinkVersion::V2) {
23147            let len = __tmp.len();
23148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23149        } else {
23150            __tmp.len()
23151        }
23152    }
23153}
23154#[doc = "Response from a PARAM_EXT_SET message."]
23155#[doc = ""]
23156#[doc = "ID: 324"]
23157#[derive(Debug, Clone, PartialEq)]
23158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23160#[cfg_attr(feature = "ts", derive(TS))]
23161#[cfg_attr(feature = "ts", ts(export))]
23162pub struct PARAM_EXT_ACK_DATA {
23163    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23164    #[cfg_attr(
23165        feature = "serde",
23166        serde(
23167            serialize_with = "crate::nulstr::serialize::<_, 16>",
23168            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23169        )
23170    )]
23171    #[cfg_attr(feature = "ts", ts(type = "string"))]
23172    pub param_id: [u8; 16],
23173    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23174    #[cfg_attr(
23175        feature = "serde",
23176        serde(
23177            serialize_with = "crate::nulstr::serialize::<_, 128>",
23178            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
23179        )
23180    )]
23181    #[cfg_attr(feature = "ts", ts(type = "string"))]
23182    pub param_value: [u8; 128],
23183    #[doc = "Parameter type."]
23184    pub param_type: MavParamExtType,
23185    #[doc = "Result code."]
23186    pub param_result: ParamAck,
23187}
23188impl PARAM_EXT_ACK_DATA {
23189    pub const ENCODED_LEN: usize = 146usize;
23190    pub const DEFAULT: Self = Self {
23191        param_id: [0_u8; 16usize],
23192        param_value: [0_u8; 128usize],
23193        param_type: MavParamExtType::DEFAULT,
23194        param_result: ParamAck::DEFAULT,
23195    };
23196    #[cfg(feature = "arbitrary")]
23197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23198        use arbitrary::{Arbitrary, Unstructured};
23199        let mut buf = [0u8; 1024];
23200        rng.fill_bytes(&mut buf);
23201        let mut unstructured = Unstructured::new(&buf);
23202        Self::arbitrary(&mut unstructured).unwrap_or_default()
23203    }
23204}
23205impl Default for PARAM_EXT_ACK_DATA {
23206    fn default() -> Self {
23207        Self::DEFAULT.clone()
23208    }
23209}
23210impl MessageData for PARAM_EXT_ACK_DATA {
23211    type Message = MavMessage;
23212    const ID: u32 = 324u32;
23213    const NAME: &'static str = "PARAM_EXT_ACK";
23214    const EXTRA_CRC: u8 = 132u8;
23215    const ENCODED_LEN: usize = 146usize;
23216    fn deser(
23217        _version: MavlinkVersion,
23218        __input: &[u8],
23219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23220        let avail_len = __input.len();
23221        let mut payload_buf = [0; Self::ENCODED_LEN];
23222        let mut buf = if avail_len < Self::ENCODED_LEN {
23223            payload_buf[0..avail_len].copy_from_slice(__input);
23224            Bytes::new(&payload_buf)
23225        } else {
23226            Bytes::new(__input)
23227        };
23228        let mut __struct = Self::default();
23229        for v in &mut __struct.param_id {
23230            let val = buf.get_u8();
23231            *v = val;
23232        }
23233        for v in &mut __struct.param_value {
23234            let val = buf.get_u8();
23235            *v = val;
23236        }
23237        let tmp = buf.get_u8();
23238        __struct.param_type =
23239            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23240                enum_type: "MavParamExtType",
23241                value: tmp as u32,
23242            })?;
23243        let tmp = buf.get_u8();
23244        __struct.param_result =
23245            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23246                enum_type: "ParamAck",
23247                value: tmp as u32,
23248            })?;
23249        Ok(__struct)
23250    }
23251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23252        let mut __tmp = BytesMut::new(bytes);
23253        #[allow(clippy::absurd_extreme_comparisons)]
23254        #[allow(unused_comparisons)]
23255        if __tmp.remaining() < Self::ENCODED_LEN {
23256            panic!(
23257                "buffer is too small (need {} bytes, but got {})",
23258                Self::ENCODED_LEN,
23259                __tmp.remaining(),
23260            )
23261        }
23262        for val in &self.param_id {
23263            __tmp.put_u8(*val);
23264        }
23265        for val in &self.param_value {
23266            __tmp.put_u8(*val);
23267        }
23268        __tmp.put_u8(self.param_type as u8);
23269        __tmp.put_u8(self.param_result as u8);
23270        if matches!(version, MavlinkVersion::V2) {
23271            let len = __tmp.len();
23272            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23273        } else {
23274            __tmp.len()
23275        }
23276    }
23277}
23278#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23279#[doc = ""]
23280#[doc = "ID: 321"]
23281#[derive(Debug, Clone, PartialEq)]
23282#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23283#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23284#[cfg_attr(feature = "ts", derive(TS))]
23285#[cfg_attr(feature = "ts", ts(export))]
23286pub struct PARAM_EXT_REQUEST_LIST_DATA {
23287    #[doc = "System ID"]
23288    pub target_system: u8,
23289    #[doc = "Component ID"]
23290    pub target_component: u8,
23291}
23292impl PARAM_EXT_REQUEST_LIST_DATA {
23293    pub const ENCODED_LEN: usize = 2usize;
23294    pub const DEFAULT: Self = Self {
23295        target_system: 0_u8,
23296        target_component: 0_u8,
23297    };
23298    #[cfg(feature = "arbitrary")]
23299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23300        use arbitrary::{Arbitrary, Unstructured};
23301        let mut buf = [0u8; 1024];
23302        rng.fill_bytes(&mut buf);
23303        let mut unstructured = Unstructured::new(&buf);
23304        Self::arbitrary(&mut unstructured).unwrap_or_default()
23305    }
23306}
23307impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23308    fn default() -> Self {
23309        Self::DEFAULT.clone()
23310    }
23311}
23312impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23313    type Message = MavMessage;
23314    const ID: u32 = 321u32;
23315    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23316    const EXTRA_CRC: u8 = 88u8;
23317    const ENCODED_LEN: usize = 2usize;
23318    fn deser(
23319        _version: MavlinkVersion,
23320        __input: &[u8],
23321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23322        let avail_len = __input.len();
23323        let mut payload_buf = [0; Self::ENCODED_LEN];
23324        let mut buf = if avail_len < Self::ENCODED_LEN {
23325            payload_buf[0..avail_len].copy_from_slice(__input);
23326            Bytes::new(&payload_buf)
23327        } else {
23328            Bytes::new(__input)
23329        };
23330        let mut __struct = Self::default();
23331        __struct.target_system = buf.get_u8();
23332        __struct.target_component = buf.get_u8();
23333        Ok(__struct)
23334    }
23335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23336        let mut __tmp = BytesMut::new(bytes);
23337        #[allow(clippy::absurd_extreme_comparisons)]
23338        #[allow(unused_comparisons)]
23339        if __tmp.remaining() < Self::ENCODED_LEN {
23340            panic!(
23341                "buffer is too small (need {} bytes, but got {})",
23342                Self::ENCODED_LEN,
23343                __tmp.remaining(),
23344            )
23345        }
23346        __tmp.put_u8(self.target_system);
23347        __tmp.put_u8(self.target_component);
23348        if matches!(version, MavlinkVersion::V2) {
23349            let len = __tmp.len();
23350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23351        } else {
23352            __tmp.len()
23353        }
23354    }
23355}
23356#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23357#[doc = ""]
23358#[doc = "ID: 320"]
23359#[derive(Debug, Clone, PartialEq)]
23360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23362#[cfg_attr(feature = "ts", derive(TS))]
23363#[cfg_attr(feature = "ts", ts(export))]
23364pub struct PARAM_EXT_REQUEST_READ_DATA {
23365    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23366    pub param_index: i16,
23367    #[doc = "System ID"]
23368    pub target_system: u8,
23369    #[doc = "Component ID"]
23370    pub target_component: u8,
23371    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23372    #[cfg_attr(
23373        feature = "serde",
23374        serde(
23375            serialize_with = "crate::nulstr::serialize::<_, 16>",
23376            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23377        )
23378    )]
23379    #[cfg_attr(feature = "ts", ts(type = "string"))]
23380    pub param_id: [u8; 16],
23381}
23382impl PARAM_EXT_REQUEST_READ_DATA {
23383    pub const ENCODED_LEN: usize = 20usize;
23384    pub const DEFAULT: Self = Self {
23385        param_index: 0_i16,
23386        target_system: 0_u8,
23387        target_component: 0_u8,
23388        param_id: [0_u8; 16usize],
23389    };
23390    #[cfg(feature = "arbitrary")]
23391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23392        use arbitrary::{Arbitrary, Unstructured};
23393        let mut buf = [0u8; 1024];
23394        rng.fill_bytes(&mut buf);
23395        let mut unstructured = Unstructured::new(&buf);
23396        Self::arbitrary(&mut unstructured).unwrap_or_default()
23397    }
23398}
23399impl Default for PARAM_EXT_REQUEST_READ_DATA {
23400    fn default() -> Self {
23401        Self::DEFAULT.clone()
23402    }
23403}
23404impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23405    type Message = MavMessage;
23406    const ID: u32 = 320u32;
23407    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23408    const EXTRA_CRC: u8 = 243u8;
23409    const ENCODED_LEN: usize = 20usize;
23410    fn deser(
23411        _version: MavlinkVersion,
23412        __input: &[u8],
23413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23414        let avail_len = __input.len();
23415        let mut payload_buf = [0; Self::ENCODED_LEN];
23416        let mut buf = if avail_len < Self::ENCODED_LEN {
23417            payload_buf[0..avail_len].copy_from_slice(__input);
23418            Bytes::new(&payload_buf)
23419        } else {
23420            Bytes::new(__input)
23421        };
23422        let mut __struct = Self::default();
23423        __struct.param_index = buf.get_i16_le();
23424        __struct.target_system = buf.get_u8();
23425        __struct.target_component = buf.get_u8();
23426        for v in &mut __struct.param_id {
23427            let val = buf.get_u8();
23428            *v = val;
23429        }
23430        Ok(__struct)
23431    }
23432    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23433        let mut __tmp = BytesMut::new(bytes);
23434        #[allow(clippy::absurd_extreme_comparisons)]
23435        #[allow(unused_comparisons)]
23436        if __tmp.remaining() < Self::ENCODED_LEN {
23437            panic!(
23438                "buffer is too small (need {} bytes, but got {})",
23439                Self::ENCODED_LEN,
23440                __tmp.remaining(),
23441            )
23442        }
23443        __tmp.put_i16_le(self.param_index);
23444        __tmp.put_u8(self.target_system);
23445        __tmp.put_u8(self.target_component);
23446        for val in &self.param_id {
23447            __tmp.put_u8(*val);
23448        }
23449        if matches!(version, MavlinkVersion::V2) {
23450            let len = __tmp.len();
23451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23452        } else {
23453            __tmp.len()
23454        }
23455    }
23456}
23457#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23458#[doc = ""]
23459#[doc = "ID: 323"]
23460#[derive(Debug, Clone, PartialEq)]
23461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23463#[cfg_attr(feature = "ts", derive(TS))]
23464#[cfg_attr(feature = "ts", ts(export))]
23465pub struct PARAM_EXT_SET_DATA {
23466    #[doc = "System ID"]
23467    pub target_system: u8,
23468    #[doc = "Component ID"]
23469    pub target_component: u8,
23470    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23471    #[cfg_attr(
23472        feature = "serde",
23473        serde(
23474            serialize_with = "crate::nulstr::serialize::<_, 16>",
23475            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23476        )
23477    )]
23478    #[cfg_attr(feature = "ts", ts(type = "string"))]
23479    pub param_id: [u8; 16],
23480    #[doc = "Parameter value"]
23481    #[cfg_attr(
23482        feature = "serde",
23483        serde(
23484            serialize_with = "crate::nulstr::serialize::<_, 128>",
23485            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
23486        )
23487    )]
23488    #[cfg_attr(feature = "ts", ts(type = "string"))]
23489    pub param_value: [u8; 128],
23490    #[doc = "Parameter type."]
23491    pub param_type: MavParamExtType,
23492}
23493impl PARAM_EXT_SET_DATA {
23494    pub const ENCODED_LEN: usize = 147usize;
23495    pub const DEFAULT: Self = Self {
23496        target_system: 0_u8,
23497        target_component: 0_u8,
23498        param_id: [0_u8; 16usize],
23499        param_value: [0_u8; 128usize],
23500        param_type: MavParamExtType::DEFAULT,
23501    };
23502    #[cfg(feature = "arbitrary")]
23503    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23504        use arbitrary::{Arbitrary, Unstructured};
23505        let mut buf = [0u8; 1024];
23506        rng.fill_bytes(&mut buf);
23507        let mut unstructured = Unstructured::new(&buf);
23508        Self::arbitrary(&mut unstructured).unwrap_or_default()
23509    }
23510}
23511impl Default for PARAM_EXT_SET_DATA {
23512    fn default() -> Self {
23513        Self::DEFAULT.clone()
23514    }
23515}
23516impl MessageData for PARAM_EXT_SET_DATA {
23517    type Message = MavMessage;
23518    const ID: u32 = 323u32;
23519    const NAME: &'static str = "PARAM_EXT_SET";
23520    const EXTRA_CRC: u8 = 78u8;
23521    const ENCODED_LEN: usize = 147usize;
23522    fn deser(
23523        _version: MavlinkVersion,
23524        __input: &[u8],
23525    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23526        let avail_len = __input.len();
23527        let mut payload_buf = [0; Self::ENCODED_LEN];
23528        let mut buf = if avail_len < Self::ENCODED_LEN {
23529            payload_buf[0..avail_len].copy_from_slice(__input);
23530            Bytes::new(&payload_buf)
23531        } else {
23532            Bytes::new(__input)
23533        };
23534        let mut __struct = Self::default();
23535        __struct.target_system = buf.get_u8();
23536        __struct.target_component = buf.get_u8();
23537        for v in &mut __struct.param_id {
23538            let val = buf.get_u8();
23539            *v = val;
23540        }
23541        for v in &mut __struct.param_value {
23542            let val = buf.get_u8();
23543            *v = val;
23544        }
23545        let tmp = buf.get_u8();
23546        __struct.param_type =
23547            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23548                enum_type: "MavParamExtType",
23549                value: tmp as u32,
23550            })?;
23551        Ok(__struct)
23552    }
23553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23554        let mut __tmp = BytesMut::new(bytes);
23555        #[allow(clippy::absurd_extreme_comparisons)]
23556        #[allow(unused_comparisons)]
23557        if __tmp.remaining() < Self::ENCODED_LEN {
23558            panic!(
23559                "buffer is too small (need {} bytes, but got {})",
23560                Self::ENCODED_LEN,
23561                __tmp.remaining(),
23562            )
23563        }
23564        __tmp.put_u8(self.target_system);
23565        __tmp.put_u8(self.target_component);
23566        for val in &self.param_id {
23567            __tmp.put_u8(*val);
23568        }
23569        for val in &self.param_value {
23570            __tmp.put_u8(*val);
23571        }
23572        __tmp.put_u8(self.param_type as u8);
23573        if matches!(version, MavlinkVersion::V2) {
23574            let len = __tmp.len();
23575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23576        } else {
23577            __tmp.len()
23578        }
23579    }
23580}
23581#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23582#[doc = ""]
23583#[doc = "ID: 322"]
23584#[derive(Debug, Clone, PartialEq)]
23585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23587#[cfg_attr(feature = "ts", derive(TS))]
23588#[cfg_attr(feature = "ts", ts(export))]
23589pub struct PARAM_EXT_VALUE_DATA {
23590    #[doc = "Total number of parameters"]
23591    pub param_count: u16,
23592    #[doc = "Index of this parameter"]
23593    pub param_index: u16,
23594    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23595    #[cfg_attr(
23596        feature = "serde",
23597        serde(
23598            serialize_with = "crate::nulstr::serialize::<_, 16>",
23599            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23600        )
23601    )]
23602    #[cfg_attr(feature = "ts", ts(type = "string"))]
23603    pub param_id: [u8; 16],
23604    #[doc = "Parameter value"]
23605    #[cfg_attr(
23606        feature = "serde",
23607        serde(
23608            serialize_with = "crate::nulstr::serialize::<_, 128>",
23609            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
23610        )
23611    )]
23612    #[cfg_attr(feature = "ts", ts(type = "string"))]
23613    pub param_value: [u8; 128],
23614    #[doc = "Parameter type."]
23615    pub param_type: MavParamExtType,
23616}
23617impl PARAM_EXT_VALUE_DATA {
23618    pub const ENCODED_LEN: usize = 149usize;
23619    pub const DEFAULT: Self = Self {
23620        param_count: 0_u16,
23621        param_index: 0_u16,
23622        param_id: [0_u8; 16usize],
23623        param_value: [0_u8; 128usize],
23624        param_type: MavParamExtType::DEFAULT,
23625    };
23626    #[cfg(feature = "arbitrary")]
23627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23628        use arbitrary::{Arbitrary, Unstructured};
23629        let mut buf = [0u8; 1024];
23630        rng.fill_bytes(&mut buf);
23631        let mut unstructured = Unstructured::new(&buf);
23632        Self::arbitrary(&mut unstructured).unwrap_or_default()
23633    }
23634}
23635impl Default for PARAM_EXT_VALUE_DATA {
23636    fn default() -> Self {
23637        Self::DEFAULT.clone()
23638    }
23639}
23640impl MessageData for PARAM_EXT_VALUE_DATA {
23641    type Message = MavMessage;
23642    const ID: u32 = 322u32;
23643    const NAME: &'static str = "PARAM_EXT_VALUE";
23644    const EXTRA_CRC: u8 = 243u8;
23645    const ENCODED_LEN: usize = 149usize;
23646    fn deser(
23647        _version: MavlinkVersion,
23648        __input: &[u8],
23649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23650        let avail_len = __input.len();
23651        let mut payload_buf = [0; Self::ENCODED_LEN];
23652        let mut buf = if avail_len < Self::ENCODED_LEN {
23653            payload_buf[0..avail_len].copy_from_slice(__input);
23654            Bytes::new(&payload_buf)
23655        } else {
23656            Bytes::new(__input)
23657        };
23658        let mut __struct = Self::default();
23659        __struct.param_count = buf.get_u16_le();
23660        __struct.param_index = buf.get_u16_le();
23661        for v in &mut __struct.param_id {
23662            let val = buf.get_u8();
23663            *v = val;
23664        }
23665        for v in &mut __struct.param_value {
23666            let val = buf.get_u8();
23667            *v = val;
23668        }
23669        let tmp = buf.get_u8();
23670        __struct.param_type =
23671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23672                enum_type: "MavParamExtType",
23673                value: tmp as u32,
23674            })?;
23675        Ok(__struct)
23676    }
23677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23678        let mut __tmp = BytesMut::new(bytes);
23679        #[allow(clippy::absurd_extreme_comparisons)]
23680        #[allow(unused_comparisons)]
23681        if __tmp.remaining() < Self::ENCODED_LEN {
23682            panic!(
23683                "buffer is too small (need {} bytes, but got {})",
23684                Self::ENCODED_LEN,
23685                __tmp.remaining(),
23686            )
23687        }
23688        __tmp.put_u16_le(self.param_count);
23689        __tmp.put_u16_le(self.param_index);
23690        for val in &self.param_id {
23691            __tmp.put_u8(*val);
23692        }
23693        for val in &self.param_value {
23694            __tmp.put_u8(*val);
23695        }
23696        __tmp.put_u8(self.param_type as u8);
23697        if matches!(version, MavlinkVersion::V2) {
23698            let len = __tmp.len();
23699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23700        } else {
23701            __tmp.len()
23702        }
23703    }
23704}
23705#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23706#[doc = ""]
23707#[doc = "ID: 50"]
23708#[derive(Debug, Clone, PartialEq)]
23709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23711#[cfg_attr(feature = "ts", derive(TS))]
23712#[cfg_attr(feature = "ts", ts(export))]
23713pub struct PARAM_MAP_RC_DATA {
23714    #[doc = "Initial parameter value"]
23715    pub param_value0: f32,
23716    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23717    pub scale: f32,
23718    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23719    pub param_value_min: f32,
23720    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23721    pub param_value_max: f32,
23722    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23723    pub param_index: i16,
23724    #[doc = "System ID"]
23725    pub target_system: u8,
23726    #[doc = "Component ID"]
23727    pub target_component: u8,
23728    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23729    #[cfg_attr(
23730        feature = "serde",
23731        serde(
23732            serialize_with = "crate::nulstr::serialize::<_, 16>",
23733            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23734        )
23735    )]
23736    #[cfg_attr(feature = "ts", ts(type = "string"))]
23737    pub param_id: [u8; 16],
23738    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23739    pub parameter_rc_channel_index: u8,
23740}
23741impl PARAM_MAP_RC_DATA {
23742    pub const ENCODED_LEN: usize = 37usize;
23743    pub const DEFAULT: Self = Self {
23744        param_value0: 0.0_f32,
23745        scale: 0.0_f32,
23746        param_value_min: 0.0_f32,
23747        param_value_max: 0.0_f32,
23748        param_index: 0_i16,
23749        target_system: 0_u8,
23750        target_component: 0_u8,
23751        param_id: [0_u8; 16usize],
23752        parameter_rc_channel_index: 0_u8,
23753    };
23754    #[cfg(feature = "arbitrary")]
23755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23756        use arbitrary::{Arbitrary, Unstructured};
23757        let mut buf = [0u8; 1024];
23758        rng.fill_bytes(&mut buf);
23759        let mut unstructured = Unstructured::new(&buf);
23760        Self::arbitrary(&mut unstructured).unwrap_or_default()
23761    }
23762}
23763impl Default for PARAM_MAP_RC_DATA {
23764    fn default() -> Self {
23765        Self::DEFAULT.clone()
23766    }
23767}
23768impl MessageData for PARAM_MAP_RC_DATA {
23769    type Message = MavMessage;
23770    const ID: u32 = 50u32;
23771    const NAME: &'static str = "PARAM_MAP_RC";
23772    const EXTRA_CRC: u8 = 78u8;
23773    const ENCODED_LEN: usize = 37usize;
23774    fn deser(
23775        _version: MavlinkVersion,
23776        __input: &[u8],
23777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23778        let avail_len = __input.len();
23779        let mut payload_buf = [0; Self::ENCODED_LEN];
23780        let mut buf = if avail_len < Self::ENCODED_LEN {
23781            payload_buf[0..avail_len].copy_from_slice(__input);
23782            Bytes::new(&payload_buf)
23783        } else {
23784            Bytes::new(__input)
23785        };
23786        let mut __struct = Self::default();
23787        __struct.param_value0 = buf.get_f32_le();
23788        __struct.scale = buf.get_f32_le();
23789        __struct.param_value_min = buf.get_f32_le();
23790        __struct.param_value_max = buf.get_f32_le();
23791        __struct.param_index = buf.get_i16_le();
23792        __struct.target_system = buf.get_u8();
23793        __struct.target_component = buf.get_u8();
23794        for v in &mut __struct.param_id {
23795            let val = buf.get_u8();
23796            *v = val;
23797        }
23798        __struct.parameter_rc_channel_index = buf.get_u8();
23799        Ok(__struct)
23800    }
23801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23802        let mut __tmp = BytesMut::new(bytes);
23803        #[allow(clippy::absurd_extreme_comparisons)]
23804        #[allow(unused_comparisons)]
23805        if __tmp.remaining() < Self::ENCODED_LEN {
23806            panic!(
23807                "buffer is too small (need {} bytes, but got {})",
23808                Self::ENCODED_LEN,
23809                __tmp.remaining(),
23810            )
23811        }
23812        __tmp.put_f32_le(self.param_value0);
23813        __tmp.put_f32_le(self.scale);
23814        __tmp.put_f32_le(self.param_value_min);
23815        __tmp.put_f32_le(self.param_value_max);
23816        __tmp.put_i16_le(self.param_index);
23817        __tmp.put_u8(self.target_system);
23818        __tmp.put_u8(self.target_component);
23819        for val in &self.param_id {
23820            __tmp.put_u8(*val);
23821        }
23822        __tmp.put_u8(self.parameter_rc_channel_index);
23823        if matches!(version, MavlinkVersion::V2) {
23824            let len = __tmp.len();
23825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23826        } else {
23827            __tmp.len()
23828        }
23829    }
23830}
23831#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23832#[doc = ""]
23833#[doc = "ID: 21"]
23834#[derive(Debug, Clone, PartialEq)]
23835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23837#[cfg_attr(feature = "ts", derive(TS))]
23838#[cfg_attr(feature = "ts", ts(export))]
23839pub struct PARAM_REQUEST_LIST_DATA {
23840    #[doc = "System ID"]
23841    pub target_system: u8,
23842    #[doc = "Component ID"]
23843    pub target_component: u8,
23844}
23845impl PARAM_REQUEST_LIST_DATA {
23846    pub const ENCODED_LEN: usize = 2usize;
23847    pub const DEFAULT: Self = Self {
23848        target_system: 0_u8,
23849        target_component: 0_u8,
23850    };
23851    #[cfg(feature = "arbitrary")]
23852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23853        use arbitrary::{Arbitrary, Unstructured};
23854        let mut buf = [0u8; 1024];
23855        rng.fill_bytes(&mut buf);
23856        let mut unstructured = Unstructured::new(&buf);
23857        Self::arbitrary(&mut unstructured).unwrap_or_default()
23858    }
23859}
23860impl Default for PARAM_REQUEST_LIST_DATA {
23861    fn default() -> Self {
23862        Self::DEFAULT.clone()
23863    }
23864}
23865impl MessageData for PARAM_REQUEST_LIST_DATA {
23866    type Message = MavMessage;
23867    const ID: u32 = 21u32;
23868    const NAME: &'static str = "PARAM_REQUEST_LIST";
23869    const EXTRA_CRC: u8 = 159u8;
23870    const ENCODED_LEN: usize = 2usize;
23871    fn deser(
23872        _version: MavlinkVersion,
23873        __input: &[u8],
23874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23875        let avail_len = __input.len();
23876        let mut payload_buf = [0; Self::ENCODED_LEN];
23877        let mut buf = if avail_len < Self::ENCODED_LEN {
23878            payload_buf[0..avail_len].copy_from_slice(__input);
23879            Bytes::new(&payload_buf)
23880        } else {
23881            Bytes::new(__input)
23882        };
23883        let mut __struct = Self::default();
23884        __struct.target_system = buf.get_u8();
23885        __struct.target_component = buf.get_u8();
23886        Ok(__struct)
23887    }
23888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23889        let mut __tmp = BytesMut::new(bytes);
23890        #[allow(clippy::absurd_extreme_comparisons)]
23891        #[allow(unused_comparisons)]
23892        if __tmp.remaining() < Self::ENCODED_LEN {
23893            panic!(
23894                "buffer is too small (need {} bytes, but got {})",
23895                Self::ENCODED_LEN,
23896                __tmp.remaining(),
23897            )
23898        }
23899        __tmp.put_u8(self.target_system);
23900        __tmp.put_u8(self.target_component);
23901        if matches!(version, MavlinkVersion::V2) {
23902            let len = __tmp.len();
23903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23904        } else {
23905            __tmp.len()
23906        }
23907    }
23908}
23909#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23910#[doc = ""]
23911#[doc = "ID: 20"]
23912#[derive(Debug, Clone, PartialEq)]
23913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23915#[cfg_attr(feature = "ts", derive(TS))]
23916#[cfg_attr(feature = "ts", ts(export))]
23917pub struct PARAM_REQUEST_READ_DATA {
23918    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23919    pub param_index: i16,
23920    #[doc = "System ID"]
23921    pub target_system: u8,
23922    #[doc = "Component ID"]
23923    pub target_component: u8,
23924    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23925    #[cfg_attr(
23926        feature = "serde",
23927        serde(
23928            serialize_with = "crate::nulstr::serialize::<_, 16>",
23929            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23930        )
23931    )]
23932    #[cfg_attr(feature = "ts", ts(type = "string"))]
23933    pub param_id: [u8; 16],
23934}
23935impl PARAM_REQUEST_READ_DATA {
23936    pub const ENCODED_LEN: usize = 20usize;
23937    pub const DEFAULT: Self = Self {
23938        param_index: 0_i16,
23939        target_system: 0_u8,
23940        target_component: 0_u8,
23941        param_id: [0_u8; 16usize],
23942    };
23943    #[cfg(feature = "arbitrary")]
23944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23945        use arbitrary::{Arbitrary, Unstructured};
23946        let mut buf = [0u8; 1024];
23947        rng.fill_bytes(&mut buf);
23948        let mut unstructured = Unstructured::new(&buf);
23949        Self::arbitrary(&mut unstructured).unwrap_or_default()
23950    }
23951}
23952impl Default for PARAM_REQUEST_READ_DATA {
23953    fn default() -> Self {
23954        Self::DEFAULT.clone()
23955    }
23956}
23957impl MessageData for PARAM_REQUEST_READ_DATA {
23958    type Message = MavMessage;
23959    const ID: u32 = 20u32;
23960    const NAME: &'static str = "PARAM_REQUEST_READ";
23961    const EXTRA_CRC: u8 = 214u8;
23962    const ENCODED_LEN: usize = 20usize;
23963    fn deser(
23964        _version: MavlinkVersion,
23965        __input: &[u8],
23966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23967        let avail_len = __input.len();
23968        let mut payload_buf = [0; Self::ENCODED_LEN];
23969        let mut buf = if avail_len < Self::ENCODED_LEN {
23970            payload_buf[0..avail_len].copy_from_slice(__input);
23971            Bytes::new(&payload_buf)
23972        } else {
23973            Bytes::new(__input)
23974        };
23975        let mut __struct = Self::default();
23976        __struct.param_index = buf.get_i16_le();
23977        __struct.target_system = buf.get_u8();
23978        __struct.target_component = buf.get_u8();
23979        for v in &mut __struct.param_id {
23980            let val = buf.get_u8();
23981            *v = val;
23982        }
23983        Ok(__struct)
23984    }
23985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23986        let mut __tmp = BytesMut::new(bytes);
23987        #[allow(clippy::absurd_extreme_comparisons)]
23988        #[allow(unused_comparisons)]
23989        if __tmp.remaining() < Self::ENCODED_LEN {
23990            panic!(
23991                "buffer is too small (need {} bytes, but got {})",
23992                Self::ENCODED_LEN,
23993                __tmp.remaining(),
23994            )
23995        }
23996        __tmp.put_i16_le(self.param_index);
23997        __tmp.put_u8(self.target_system);
23998        __tmp.put_u8(self.target_component);
23999        for val in &self.param_id {
24000            __tmp.put_u8(*val);
24001        }
24002        if matches!(version, MavlinkVersion::V2) {
24003            let len = __tmp.len();
24004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24005        } else {
24006            __tmp.len()
24007        }
24008    }
24009}
24010#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24011#[doc = ""]
24012#[doc = "ID: 23"]
24013#[derive(Debug, Clone, PartialEq)]
24014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24016#[cfg_attr(feature = "ts", derive(TS))]
24017#[cfg_attr(feature = "ts", ts(export))]
24018pub struct PARAM_SET_DATA {
24019    #[doc = "Onboard parameter value"]
24020    pub param_value: f32,
24021    #[doc = "System ID"]
24022    pub target_system: u8,
24023    #[doc = "Component ID"]
24024    pub target_component: u8,
24025    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24026    #[cfg_attr(
24027        feature = "serde",
24028        serde(
24029            serialize_with = "crate::nulstr::serialize::<_, 16>",
24030            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24031        )
24032    )]
24033    #[cfg_attr(feature = "ts", ts(type = "string"))]
24034    pub param_id: [u8; 16],
24035    #[doc = "Onboard parameter type."]
24036    pub param_type: MavParamType,
24037}
24038impl PARAM_SET_DATA {
24039    pub const ENCODED_LEN: usize = 23usize;
24040    pub const DEFAULT: Self = Self {
24041        param_value: 0.0_f32,
24042        target_system: 0_u8,
24043        target_component: 0_u8,
24044        param_id: [0_u8; 16usize],
24045        param_type: MavParamType::DEFAULT,
24046    };
24047    #[cfg(feature = "arbitrary")]
24048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24049        use arbitrary::{Arbitrary, Unstructured};
24050        let mut buf = [0u8; 1024];
24051        rng.fill_bytes(&mut buf);
24052        let mut unstructured = Unstructured::new(&buf);
24053        Self::arbitrary(&mut unstructured).unwrap_or_default()
24054    }
24055}
24056impl Default for PARAM_SET_DATA {
24057    fn default() -> Self {
24058        Self::DEFAULT.clone()
24059    }
24060}
24061impl MessageData for PARAM_SET_DATA {
24062    type Message = MavMessage;
24063    const ID: u32 = 23u32;
24064    const NAME: &'static str = "PARAM_SET";
24065    const EXTRA_CRC: u8 = 168u8;
24066    const ENCODED_LEN: usize = 23usize;
24067    fn deser(
24068        _version: MavlinkVersion,
24069        __input: &[u8],
24070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24071        let avail_len = __input.len();
24072        let mut payload_buf = [0; Self::ENCODED_LEN];
24073        let mut buf = if avail_len < Self::ENCODED_LEN {
24074            payload_buf[0..avail_len].copy_from_slice(__input);
24075            Bytes::new(&payload_buf)
24076        } else {
24077            Bytes::new(__input)
24078        };
24079        let mut __struct = Self::default();
24080        __struct.param_value = buf.get_f32_le();
24081        __struct.target_system = buf.get_u8();
24082        __struct.target_component = buf.get_u8();
24083        for v in &mut __struct.param_id {
24084            let val = buf.get_u8();
24085            *v = val;
24086        }
24087        let tmp = buf.get_u8();
24088        __struct.param_type =
24089            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24090                enum_type: "MavParamType",
24091                value: tmp as u32,
24092            })?;
24093        Ok(__struct)
24094    }
24095    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24096        let mut __tmp = BytesMut::new(bytes);
24097        #[allow(clippy::absurd_extreme_comparisons)]
24098        #[allow(unused_comparisons)]
24099        if __tmp.remaining() < Self::ENCODED_LEN {
24100            panic!(
24101                "buffer is too small (need {} bytes, but got {})",
24102                Self::ENCODED_LEN,
24103                __tmp.remaining(),
24104            )
24105        }
24106        __tmp.put_f32_le(self.param_value);
24107        __tmp.put_u8(self.target_system);
24108        __tmp.put_u8(self.target_component);
24109        for val in &self.param_id {
24110            __tmp.put_u8(*val);
24111        }
24112        __tmp.put_u8(self.param_type as u8);
24113        if matches!(version, MavlinkVersion::V2) {
24114            let len = __tmp.len();
24115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24116        } else {
24117            __tmp.len()
24118        }
24119    }
24120}
24121#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24122#[doc = ""]
24123#[doc = "ID: 22"]
24124#[derive(Debug, Clone, PartialEq)]
24125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24127#[cfg_attr(feature = "ts", derive(TS))]
24128#[cfg_attr(feature = "ts", ts(export))]
24129pub struct PARAM_VALUE_DATA {
24130    #[doc = "Onboard parameter value"]
24131    pub param_value: f32,
24132    #[doc = "Total number of onboard parameters"]
24133    pub param_count: u16,
24134    #[doc = "Index of this onboard parameter"]
24135    pub param_index: u16,
24136    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24137    #[cfg_attr(
24138        feature = "serde",
24139        serde(
24140            serialize_with = "crate::nulstr::serialize::<_, 16>",
24141            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24142        )
24143    )]
24144    #[cfg_attr(feature = "ts", ts(type = "string"))]
24145    pub param_id: [u8; 16],
24146    #[doc = "Onboard parameter type."]
24147    pub param_type: MavParamType,
24148}
24149impl PARAM_VALUE_DATA {
24150    pub const ENCODED_LEN: usize = 25usize;
24151    pub const DEFAULT: Self = Self {
24152        param_value: 0.0_f32,
24153        param_count: 0_u16,
24154        param_index: 0_u16,
24155        param_id: [0_u8; 16usize],
24156        param_type: MavParamType::DEFAULT,
24157    };
24158    #[cfg(feature = "arbitrary")]
24159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24160        use arbitrary::{Arbitrary, Unstructured};
24161        let mut buf = [0u8; 1024];
24162        rng.fill_bytes(&mut buf);
24163        let mut unstructured = Unstructured::new(&buf);
24164        Self::arbitrary(&mut unstructured).unwrap_or_default()
24165    }
24166}
24167impl Default for PARAM_VALUE_DATA {
24168    fn default() -> Self {
24169        Self::DEFAULT.clone()
24170    }
24171}
24172impl MessageData for PARAM_VALUE_DATA {
24173    type Message = MavMessage;
24174    const ID: u32 = 22u32;
24175    const NAME: &'static str = "PARAM_VALUE";
24176    const EXTRA_CRC: u8 = 220u8;
24177    const ENCODED_LEN: usize = 25usize;
24178    fn deser(
24179        _version: MavlinkVersion,
24180        __input: &[u8],
24181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24182        let avail_len = __input.len();
24183        let mut payload_buf = [0; Self::ENCODED_LEN];
24184        let mut buf = if avail_len < Self::ENCODED_LEN {
24185            payload_buf[0..avail_len].copy_from_slice(__input);
24186            Bytes::new(&payload_buf)
24187        } else {
24188            Bytes::new(__input)
24189        };
24190        let mut __struct = Self::default();
24191        __struct.param_value = buf.get_f32_le();
24192        __struct.param_count = buf.get_u16_le();
24193        __struct.param_index = buf.get_u16_le();
24194        for v in &mut __struct.param_id {
24195            let val = buf.get_u8();
24196            *v = val;
24197        }
24198        let tmp = buf.get_u8();
24199        __struct.param_type =
24200            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24201                enum_type: "MavParamType",
24202                value: tmp as u32,
24203            })?;
24204        Ok(__struct)
24205    }
24206    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24207        let mut __tmp = BytesMut::new(bytes);
24208        #[allow(clippy::absurd_extreme_comparisons)]
24209        #[allow(unused_comparisons)]
24210        if __tmp.remaining() < Self::ENCODED_LEN {
24211            panic!(
24212                "buffer is too small (need {} bytes, but got {})",
24213                Self::ENCODED_LEN,
24214                __tmp.remaining(),
24215            )
24216        }
24217        __tmp.put_f32_le(self.param_value);
24218        __tmp.put_u16_le(self.param_count);
24219        __tmp.put_u16_le(self.param_index);
24220        for val in &self.param_id {
24221            __tmp.put_u8(*val);
24222        }
24223        __tmp.put_u8(self.param_type as u8);
24224        if matches!(version, MavlinkVersion::V2) {
24225            let len = __tmp.len();
24226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24227        } else {
24228            __tmp.len()
24229        }
24230    }
24231}
24232#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24233#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24234#[doc = ""]
24235#[doc = "ID: 4"]
24236#[derive(Debug, Clone, PartialEq)]
24237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24239#[cfg_attr(feature = "ts", derive(TS))]
24240#[cfg_attr(feature = "ts", ts(export))]
24241pub struct PING_DATA {
24242    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24243    pub time_usec: u64,
24244    #[doc = "PING sequence"]
24245    pub seq: u32,
24246    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24247    pub target_system: u8,
24248    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24249    pub target_component: u8,
24250}
24251impl PING_DATA {
24252    pub const ENCODED_LEN: usize = 14usize;
24253    pub const DEFAULT: Self = Self {
24254        time_usec: 0_u64,
24255        seq: 0_u32,
24256        target_system: 0_u8,
24257        target_component: 0_u8,
24258    };
24259    #[cfg(feature = "arbitrary")]
24260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24261        use arbitrary::{Arbitrary, Unstructured};
24262        let mut buf = [0u8; 1024];
24263        rng.fill_bytes(&mut buf);
24264        let mut unstructured = Unstructured::new(&buf);
24265        Self::arbitrary(&mut unstructured).unwrap_or_default()
24266    }
24267}
24268impl Default for PING_DATA {
24269    fn default() -> Self {
24270        Self::DEFAULT.clone()
24271    }
24272}
24273impl MessageData for PING_DATA {
24274    type Message = MavMessage;
24275    const ID: u32 = 4u32;
24276    const NAME: &'static str = "PING";
24277    const EXTRA_CRC: u8 = 237u8;
24278    const ENCODED_LEN: usize = 14usize;
24279    fn deser(
24280        _version: MavlinkVersion,
24281        __input: &[u8],
24282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24283        let avail_len = __input.len();
24284        let mut payload_buf = [0; Self::ENCODED_LEN];
24285        let mut buf = if avail_len < Self::ENCODED_LEN {
24286            payload_buf[0..avail_len].copy_from_slice(__input);
24287            Bytes::new(&payload_buf)
24288        } else {
24289            Bytes::new(__input)
24290        };
24291        let mut __struct = Self::default();
24292        __struct.time_usec = buf.get_u64_le();
24293        __struct.seq = buf.get_u32_le();
24294        __struct.target_system = buf.get_u8();
24295        __struct.target_component = buf.get_u8();
24296        Ok(__struct)
24297    }
24298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24299        let mut __tmp = BytesMut::new(bytes);
24300        #[allow(clippy::absurd_extreme_comparisons)]
24301        #[allow(unused_comparisons)]
24302        if __tmp.remaining() < Self::ENCODED_LEN {
24303            panic!(
24304                "buffer is too small (need {} bytes, but got {})",
24305                Self::ENCODED_LEN,
24306                __tmp.remaining(),
24307            )
24308        }
24309        __tmp.put_u64_le(self.time_usec);
24310        __tmp.put_u32_le(self.seq);
24311        __tmp.put_u8(self.target_system);
24312        __tmp.put_u8(self.target_component);
24313        if matches!(version, MavlinkVersion::V2) {
24314            let len = __tmp.len();
24315            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24316        } else {
24317            __tmp.len()
24318        }
24319    }
24320}
24321#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24322#[doc = "Control vehicle tone generation (buzzer)."]
24323#[doc = ""]
24324#[doc = "ID: 258"]
24325#[derive(Debug, Clone, PartialEq)]
24326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24328#[cfg_attr(feature = "ts", derive(TS))]
24329#[cfg_attr(feature = "ts", ts(export))]
24330pub struct PLAY_TUNE_DATA {
24331    #[doc = "System ID"]
24332    pub target_system: u8,
24333    #[doc = "Component ID"]
24334    pub target_component: u8,
24335    #[doc = "tune in board specific format"]
24336    #[cfg_attr(
24337        feature = "serde",
24338        serde(
24339            serialize_with = "crate::nulstr::serialize::<_, 30>",
24340            deserialize_with = "crate::nulstr::deserialize::<_, 30>"
24341        )
24342    )]
24343    #[cfg_attr(feature = "ts", ts(type = "string"))]
24344    pub tune: [u8; 30],
24345    #[doc = "tune extension (appended to tune)"]
24346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24347    #[cfg_attr(
24348        feature = "serde",
24349        serde(
24350            serialize_with = "crate::nulstr::serialize::<_, 200>",
24351            deserialize_with = "crate::nulstr::deserialize::<_, 200>"
24352        )
24353    )]
24354    #[cfg_attr(feature = "ts", ts(type = "string"))]
24355    pub tune2: [u8; 200],
24356}
24357impl PLAY_TUNE_DATA {
24358    pub const ENCODED_LEN: usize = 232usize;
24359    pub const DEFAULT: Self = Self {
24360        target_system: 0_u8,
24361        target_component: 0_u8,
24362        tune: [0_u8; 30usize],
24363        tune2: [0_u8; 200usize],
24364    };
24365    #[cfg(feature = "arbitrary")]
24366    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24367        use arbitrary::{Arbitrary, Unstructured};
24368        let mut buf = [0u8; 1024];
24369        rng.fill_bytes(&mut buf);
24370        let mut unstructured = Unstructured::new(&buf);
24371        Self::arbitrary(&mut unstructured).unwrap_or_default()
24372    }
24373}
24374impl Default for PLAY_TUNE_DATA {
24375    fn default() -> Self {
24376        Self::DEFAULT.clone()
24377    }
24378}
24379impl MessageData for PLAY_TUNE_DATA {
24380    type Message = MavMessage;
24381    const ID: u32 = 258u32;
24382    const NAME: &'static str = "PLAY_TUNE";
24383    const EXTRA_CRC: u8 = 187u8;
24384    const ENCODED_LEN: usize = 232usize;
24385    fn deser(
24386        _version: MavlinkVersion,
24387        __input: &[u8],
24388    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24389        let avail_len = __input.len();
24390        let mut payload_buf = [0; Self::ENCODED_LEN];
24391        let mut buf = if avail_len < Self::ENCODED_LEN {
24392            payload_buf[0..avail_len].copy_from_slice(__input);
24393            Bytes::new(&payload_buf)
24394        } else {
24395            Bytes::new(__input)
24396        };
24397        let mut __struct = Self::default();
24398        __struct.target_system = buf.get_u8();
24399        __struct.target_component = buf.get_u8();
24400        for v in &mut __struct.tune {
24401            let val = buf.get_u8();
24402            *v = val;
24403        }
24404        for v in &mut __struct.tune2 {
24405            let val = buf.get_u8();
24406            *v = val;
24407        }
24408        Ok(__struct)
24409    }
24410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24411        let mut __tmp = BytesMut::new(bytes);
24412        #[allow(clippy::absurd_extreme_comparisons)]
24413        #[allow(unused_comparisons)]
24414        if __tmp.remaining() < Self::ENCODED_LEN {
24415            panic!(
24416                "buffer is too small (need {} bytes, but got {})",
24417                Self::ENCODED_LEN,
24418                __tmp.remaining(),
24419            )
24420        }
24421        __tmp.put_u8(self.target_system);
24422        __tmp.put_u8(self.target_component);
24423        for val in &self.tune {
24424            __tmp.put_u8(*val);
24425        }
24426        if matches!(version, MavlinkVersion::V2) {
24427            for val in &self.tune2 {
24428                __tmp.put_u8(*val);
24429            }
24430            let len = __tmp.len();
24431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24432        } else {
24433            __tmp.len()
24434        }
24435    }
24436}
24437#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24438#[doc = ""]
24439#[doc = "ID: 400"]
24440#[derive(Debug, Clone, PartialEq)]
24441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24443#[cfg_attr(feature = "ts", derive(TS))]
24444#[cfg_attr(feature = "ts", ts(export))]
24445pub struct PLAY_TUNE_V2_DATA {
24446    #[doc = "Tune format"]
24447    pub format: TuneFormat,
24448    #[doc = "System ID"]
24449    pub target_system: u8,
24450    #[doc = "Component ID"]
24451    pub target_component: u8,
24452    #[doc = "Tune definition as a NULL-terminated string."]
24453    #[cfg_attr(
24454        feature = "serde",
24455        serde(
24456            serialize_with = "crate::nulstr::serialize::<_, 248>",
24457            deserialize_with = "crate::nulstr::deserialize::<_, 248>"
24458        )
24459    )]
24460    #[cfg_attr(feature = "ts", ts(type = "string"))]
24461    pub tune: [u8; 248],
24462}
24463impl PLAY_TUNE_V2_DATA {
24464    pub const ENCODED_LEN: usize = 254usize;
24465    pub const DEFAULT: Self = Self {
24466        format: TuneFormat::DEFAULT,
24467        target_system: 0_u8,
24468        target_component: 0_u8,
24469        tune: [0_u8; 248usize],
24470    };
24471    #[cfg(feature = "arbitrary")]
24472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24473        use arbitrary::{Arbitrary, Unstructured};
24474        let mut buf = [0u8; 1024];
24475        rng.fill_bytes(&mut buf);
24476        let mut unstructured = Unstructured::new(&buf);
24477        Self::arbitrary(&mut unstructured).unwrap_or_default()
24478    }
24479}
24480impl Default for PLAY_TUNE_V2_DATA {
24481    fn default() -> Self {
24482        Self::DEFAULT.clone()
24483    }
24484}
24485impl MessageData for PLAY_TUNE_V2_DATA {
24486    type Message = MavMessage;
24487    const ID: u32 = 400u32;
24488    const NAME: &'static str = "PLAY_TUNE_V2";
24489    const EXTRA_CRC: u8 = 110u8;
24490    const ENCODED_LEN: usize = 254usize;
24491    fn deser(
24492        _version: MavlinkVersion,
24493        __input: &[u8],
24494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24495        let avail_len = __input.len();
24496        let mut payload_buf = [0; Self::ENCODED_LEN];
24497        let mut buf = if avail_len < Self::ENCODED_LEN {
24498            payload_buf[0..avail_len].copy_from_slice(__input);
24499            Bytes::new(&payload_buf)
24500        } else {
24501            Bytes::new(__input)
24502        };
24503        let mut __struct = Self::default();
24504        let tmp = buf.get_u32_le();
24505        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24506            ::mavlink_core::error::ParserError::InvalidEnum {
24507                enum_type: "TuneFormat",
24508                value: tmp as u32,
24509            },
24510        )?;
24511        __struct.target_system = buf.get_u8();
24512        __struct.target_component = buf.get_u8();
24513        for v in &mut __struct.tune {
24514            let val = buf.get_u8();
24515            *v = val;
24516        }
24517        Ok(__struct)
24518    }
24519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24520        let mut __tmp = BytesMut::new(bytes);
24521        #[allow(clippy::absurd_extreme_comparisons)]
24522        #[allow(unused_comparisons)]
24523        if __tmp.remaining() < Self::ENCODED_LEN {
24524            panic!(
24525                "buffer is too small (need {} bytes, but got {})",
24526                Self::ENCODED_LEN,
24527                __tmp.remaining(),
24528            )
24529        }
24530        __tmp.put_u32_le(self.format as u32);
24531        __tmp.put_u8(self.target_system);
24532        __tmp.put_u8(self.target_component);
24533        for val in &self.tune {
24534            __tmp.put_u8(*val);
24535        }
24536        if matches!(version, MavlinkVersion::V2) {
24537            let len = __tmp.len();
24538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24539        } else {
24540            __tmp.len()
24541        }
24542    }
24543}
24544#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24545#[doc = ""]
24546#[doc = "ID: 87"]
24547#[derive(Debug, Clone, PartialEq)]
24548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24550#[cfg_attr(feature = "ts", derive(TS))]
24551#[cfg_attr(feature = "ts", ts(export))]
24552pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24553    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24554    pub time_boot_ms: u32,
24555    #[doc = "Latitude in WGS84 frame"]
24556    pub lat_int: i32,
24557    #[doc = "Longitude in WGS84 frame"]
24558    pub lon_int: i32,
24559    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24560    pub alt: f32,
24561    #[doc = "X velocity in NED frame"]
24562    pub vx: f32,
24563    #[doc = "Y velocity in NED frame"]
24564    pub vy: f32,
24565    #[doc = "Z velocity in NED frame"]
24566    pub vz: f32,
24567    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24568    pub afx: f32,
24569    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24570    pub afy: f32,
24571    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24572    pub afz: f32,
24573    #[doc = "yaw setpoint"]
24574    pub yaw: f32,
24575    #[doc = "yaw rate setpoint"]
24576    pub yaw_rate: f32,
24577    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24578    pub type_mask: PositionTargetTypemask,
24579    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24580    pub coordinate_frame: MavFrame,
24581}
24582impl POSITION_TARGET_GLOBAL_INT_DATA {
24583    pub const ENCODED_LEN: usize = 51usize;
24584    pub const DEFAULT: Self = Self {
24585        time_boot_ms: 0_u32,
24586        lat_int: 0_i32,
24587        lon_int: 0_i32,
24588        alt: 0.0_f32,
24589        vx: 0.0_f32,
24590        vy: 0.0_f32,
24591        vz: 0.0_f32,
24592        afx: 0.0_f32,
24593        afy: 0.0_f32,
24594        afz: 0.0_f32,
24595        yaw: 0.0_f32,
24596        yaw_rate: 0.0_f32,
24597        type_mask: PositionTargetTypemask::DEFAULT,
24598        coordinate_frame: MavFrame::DEFAULT,
24599    };
24600    #[cfg(feature = "arbitrary")]
24601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24602        use arbitrary::{Arbitrary, Unstructured};
24603        let mut buf = [0u8; 1024];
24604        rng.fill_bytes(&mut buf);
24605        let mut unstructured = Unstructured::new(&buf);
24606        Self::arbitrary(&mut unstructured).unwrap_or_default()
24607    }
24608}
24609impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24610    fn default() -> Self {
24611        Self::DEFAULT.clone()
24612    }
24613}
24614impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24615    type Message = MavMessage;
24616    const ID: u32 = 87u32;
24617    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24618    const EXTRA_CRC: u8 = 150u8;
24619    const ENCODED_LEN: usize = 51usize;
24620    fn deser(
24621        _version: MavlinkVersion,
24622        __input: &[u8],
24623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24624        let avail_len = __input.len();
24625        let mut payload_buf = [0; Self::ENCODED_LEN];
24626        let mut buf = if avail_len < Self::ENCODED_LEN {
24627            payload_buf[0..avail_len].copy_from_slice(__input);
24628            Bytes::new(&payload_buf)
24629        } else {
24630            Bytes::new(__input)
24631        };
24632        let mut __struct = Self::default();
24633        __struct.time_boot_ms = buf.get_u32_le();
24634        __struct.lat_int = buf.get_i32_le();
24635        __struct.lon_int = buf.get_i32_le();
24636        __struct.alt = buf.get_f32_le();
24637        __struct.vx = buf.get_f32_le();
24638        __struct.vy = buf.get_f32_le();
24639        __struct.vz = buf.get_f32_le();
24640        __struct.afx = buf.get_f32_le();
24641        __struct.afy = buf.get_f32_le();
24642        __struct.afz = buf.get_f32_le();
24643        __struct.yaw = buf.get_f32_le();
24644        __struct.yaw_rate = buf.get_f32_le();
24645        let tmp = buf.get_u16_le();
24646        __struct.type_mask = PositionTargetTypemask::from_bits(
24647            tmp & PositionTargetTypemask::all().bits(),
24648        )
24649        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24650            flag_type: "PositionTargetTypemask",
24651            value: tmp as u32,
24652        })?;
24653        let tmp = buf.get_u8();
24654        __struct.coordinate_frame =
24655            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24656                enum_type: "MavFrame",
24657                value: tmp as u32,
24658            })?;
24659        Ok(__struct)
24660    }
24661    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24662        let mut __tmp = BytesMut::new(bytes);
24663        #[allow(clippy::absurd_extreme_comparisons)]
24664        #[allow(unused_comparisons)]
24665        if __tmp.remaining() < Self::ENCODED_LEN {
24666            panic!(
24667                "buffer is too small (need {} bytes, but got {})",
24668                Self::ENCODED_LEN,
24669                __tmp.remaining(),
24670            )
24671        }
24672        __tmp.put_u32_le(self.time_boot_ms);
24673        __tmp.put_i32_le(self.lat_int);
24674        __tmp.put_i32_le(self.lon_int);
24675        __tmp.put_f32_le(self.alt);
24676        __tmp.put_f32_le(self.vx);
24677        __tmp.put_f32_le(self.vy);
24678        __tmp.put_f32_le(self.vz);
24679        __tmp.put_f32_le(self.afx);
24680        __tmp.put_f32_le(self.afy);
24681        __tmp.put_f32_le(self.afz);
24682        __tmp.put_f32_le(self.yaw);
24683        __tmp.put_f32_le(self.yaw_rate);
24684        __tmp.put_u16_le(self.type_mask.bits());
24685        __tmp.put_u8(self.coordinate_frame as u8);
24686        if matches!(version, MavlinkVersion::V2) {
24687            let len = __tmp.len();
24688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24689        } else {
24690            __tmp.len()
24691        }
24692    }
24693}
24694#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24695#[doc = ""]
24696#[doc = "ID: 85"]
24697#[derive(Debug, Clone, PartialEq)]
24698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24700#[cfg_attr(feature = "ts", derive(TS))]
24701#[cfg_attr(feature = "ts", ts(export))]
24702pub struct POSITION_TARGET_LOCAL_NED_DATA {
24703    #[doc = "Timestamp (time since system boot)."]
24704    pub time_boot_ms: u32,
24705    #[doc = "X Position in NED frame"]
24706    pub x: f32,
24707    #[doc = "Y Position in NED frame"]
24708    pub y: f32,
24709    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24710    pub z: f32,
24711    #[doc = "X velocity in NED frame"]
24712    pub vx: f32,
24713    #[doc = "Y velocity in NED frame"]
24714    pub vy: f32,
24715    #[doc = "Z velocity in NED frame"]
24716    pub vz: f32,
24717    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24718    pub afx: f32,
24719    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24720    pub afy: f32,
24721    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24722    pub afz: f32,
24723    #[doc = "yaw setpoint"]
24724    pub yaw: f32,
24725    #[doc = "yaw rate setpoint"]
24726    pub yaw_rate: f32,
24727    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24728    pub type_mask: PositionTargetTypemask,
24729    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24730    pub coordinate_frame: MavFrame,
24731}
24732impl POSITION_TARGET_LOCAL_NED_DATA {
24733    pub const ENCODED_LEN: usize = 51usize;
24734    pub const DEFAULT: Self = Self {
24735        time_boot_ms: 0_u32,
24736        x: 0.0_f32,
24737        y: 0.0_f32,
24738        z: 0.0_f32,
24739        vx: 0.0_f32,
24740        vy: 0.0_f32,
24741        vz: 0.0_f32,
24742        afx: 0.0_f32,
24743        afy: 0.0_f32,
24744        afz: 0.0_f32,
24745        yaw: 0.0_f32,
24746        yaw_rate: 0.0_f32,
24747        type_mask: PositionTargetTypemask::DEFAULT,
24748        coordinate_frame: MavFrame::DEFAULT,
24749    };
24750    #[cfg(feature = "arbitrary")]
24751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24752        use arbitrary::{Arbitrary, Unstructured};
24753        let mut buf = [0u8; 1024];
24754        rng.fill_bytes(&mut buf);
24755        let mut unstructured = Unstructured::new(&buf);
24756        Self::arbitrary(&mut unstructured).unwrap_or_default()
24757    }
24758}
24759impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24760    fn default() -> Self {
24761        Self::DEFAULT.clone()
24762    }
24763}
24764impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24765    type Message = MavMessage;
24766    const ID: u32 = 85u32;
24767    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24768    const EXTRA_CRC: u8 = 140u8;
24769    const ENCODED_LEN: usize = 51usize;
24770    fn deser(
24771        _version: MavlinkVersion,
24772        __input: &[u8],
24773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24774        let avail_len = __input.len();
24775        let mut payload_buf = [0; Self::ENCODED_LEN];
24776        let mut buf = if avail_len < Self::ENCODED_LEN {
24777            payload_buf[0..avail_len].copy_from_slice(__input);
24778            Bytes::new(&payload_buf)
24779        } else {
24780            Bytes::new(__input)
24781        };
24782        let mut __struct = Self::default();
24783        __struct.time_boot_ms = buf.get_u32_le();
24784        __struct.x = buf.get_f32_le();
24785        __struct.y = buf.get_f32_le();
24786        __struct.z = buf.get_f32_le();
24787        __struct.vx = buf.get_f32_le();
24788        __struct.vy = buf.get_f32_le();
24789        __struct.vz = buf.get_f32_le();
24790        __struct.afx = buf.get_f32_le();
24791        __struct.afy = buf.get_f32_le();
24792        __struct.afz = buf.get_f32_le();
24793        __struct.yaw = buf.get_f32_le();
24794        __struct.yaw_rate = buf.get_f32_le();
24795        let tmp = buf.get_u16_le();
24796        __struct.type_mask = PositionTargetTypemask::from_bits(
24797            tmp & PositionTargetTypemask::all().bits(),
24798        )
24799        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24800            flag_type: "PositionTargetTypemask",
24801            value: tmp as u32,
24802        })?;
24803        let tmp = buf.get_u8();
24804        __struct.coordinate_frame =
24805            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24806                enum_type: "MavFrame",
24807                value: tmp as u32,
24808            })?;
24809        Ok(__struct)
24810    }
24811    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24812        let mut __tmp = BytesMut::new(bytes);
24813        #[allow(clippy::absurd_extreme_comparisons)]
24814        #[allow(unused_comparisons)]
24815        if __tmp.remaining() < Self::ENCODED_LEN {
24816            panic!(
24817                "buffer is too small (need {} bytes, but got {})",
24818                Self::ENCODED_LEN,
24819                __tmp.remaining(),
24820            )
24821        }
24822        __tmp.put_u32_le(self.time_boot_ms);
24823        __tmp.put_f32_le(self.x);
24824        __tmp.put_f32_le(self.y);
24825        __tmp.put_f32_le(self.z);
24826        __tmp.put_f32_le(self.vx);
24827        __tmp.put_f32_le(self.vy);
24828        __tmp.put_f32_le(self.vz);
24829        __tmp.put_f32_le(self.afx);
24830        __tmp.put_f32_le(self.afy);
24831        __tmp.put_f32_le(self.afz);
24832        __tmp.put_f32_le(self.yaw);
24833        __tmp.put_f32_le(self.yaw_rate);
24834        __tmp.put_u16_le(self.type_mask.bits());
24835        __tmp.put_u8(self.coordinate_frame as u8);
24836        if matches!(version, MavlinkVersion::V2) {
24837            let len = __tmp.len();
24838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24839        } else {
24840            __tmp.len()
24841        }
24842    }
24843}
24844#[doc = "Power supply status."]
24845#[doc = ""]
24846#[doc = "ID: 125"]
24847#[derive(Debug, Clone, PartialEq)]
24848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24850#[cfg_attr(feature = "ts", derive(TS))]
24851#[cfg_attr(feature = "ts", ts(export))]
24852pub struct POWER_STATUS_DATA {
24853    #[doc = "5V rail voltage."]
24854    pub Vcc: u16,
24855    #[doc = "Servo rail voltage."]
24856    pub Vservo: u16,
24857    #[doc = "Bitmap of power supply status flags."]
24858    pub flags: MavPowerStatus,
24859}
24860impl POWER_STATUS_DATA {
24861    pub const ENCODED_LEN: usize = 6usize;
24862    pub const DEFAULT: Self = Self {
24863        Vcc: 0_u16,
24864        Vservo: 0_u16,
24865        flags: MavPowerStatus::DEFAULT,
24866    };
24867    #[cfg(feature = "arbitrary")]
24868    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24869        use arbitrary::{Arbitrary, Unstructured};
24870        let mut buf = [0u8; 1024];
24871        rng.fill_bytes(&mut buf);
24872        let mut unstructured = Unstructured::new(&buf);
24873        Self::arbitrary(&mut unstructured).unwrap_or_default()
24874    }
24875}
24876impl Default for POWER_STATUS_DATA {
24877    fn default() -> Self {
24878        Self::DEFAULT.clone()
24879    }
24880}
24881impl MessageData for POWER_STATUS_DATA {
24882    type Message = MavMessage;
24883    const ID: u32 = 125u32;
24884    const NAME: &'static str = "POWER_STATUS";
24885    const EXTRA_CRC: u8 = 203u8;
24886    const ENCODED_LEN: usize = 6usize;
24887    fn deser(
24888        _version: MavlinkVersion,
24889        __input: &[u8],
24890    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24891        let avail_len = __input.len();
24892        let mut payload_buf = [0; Self::ENCODED_LEN];
24893        let mut buf = if avail_len < Self::ENCODED_LEN {
24894            payload_buf[0..avail_len].copy_from_slice(__input);
24895            Bytes::new(&payload_buf)
24896        } else {
24897            Bytes::new(__input)
24898        };
24899        let mut __struct = Self::default();
24900        __struct.Vcc = buf.get_u16_le();
24901        __struct.Vservo = buf.get_u16_le();
24902        let tmp = buf.get_u16_le();
24903        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24904            ::mavlink_core::error::ParserError::InvalidFlag {
24905                flag_type: "MavPowerStatus",
24906                value: tmp as u32,
24907            },
24908        )?;
24909        Ok(__struct)
24910    }
24911    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24912        let mut __tmp = BytesMut::new(bytes);
24913        #[allow(clippy::absurd_extreme_comparisons)]
24914        #[allow(unused_comparisons)]
24915        if __tmp.remaining() < Self::ENCODED_LEN {
24916            panic!(
24917                "buffer is too small (need {} bytes, but got {})",
24918                Self::ENCODED_LEN,
24919                __tmp.remaining(),
24920            )
24921        }
24922        __tmp.put_u16_le(self.Vcc);
24923        __tmp.put_u16_le(self.Vservo);
24924        __tmp.put_u16_le(self.flags.bits());
24925        if matches!(version, MavlinkVersion::V2) {
24926            let len = __tmp.len();
24927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24928        } else {
24929            __tmp.len()
24930        }
24931    }
24932}
24933#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24934#[doc = ""]
24935#[doc = "ID: 300"]
24936#[derive(Debug, Clone, PartialEq)]
24937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24939#[cfg_attr(feature = "ts", derive(TS))]
24940#[cfg_attr(feature = "ts", ts(export))]
24941pub struct PROTOCOL_VERSION_DATA {
24942    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24943    pub version: u16,
24944    #[doc = "Minimum MAVLink version supported"]
24945    pub min_version: u16,
24946    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24947    pub max_version: u16,
24948    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24949    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24950    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24951    pub spec_version_hash: [u8; 8],
24952    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24955    pub library_version_hash: [u8; 8],
24956}
24957impl PROTOCOL_VERSION_DATA {
24958    pub const ENCODED_LEN: usize = 22usize;
24959    pub const DEFAULT: Self = Self {
24960        version: 0_u16,
24961        min_version: 0_u16,
24962        max_version: 0_u16,
24963        spec_version_hash: [0_u8; 8usize],
24964        library_version_hash: [0_u8; 8usize],
24965    };
24966    #[cfg(feature = "arbitrary")]
24967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24968        use arbitrary::{Arbitrary, Unstructured};
24969        let mut buf = [0u8; 1024];
24970        rng.fill_bytes(&mut buf);
24971        let mut unstructured = Unstructured::new(&buf);
24972        Self::arbitrary(&mut unstructured).unwrap_or_default()
24973    }
24974}
24975impl Default for PROTOCOL_VERSION_DATA {
24976    fn default() -> Self {
24977        Self::DEFAULT.clone()
24978    }
24979}
24980impl MessageData for PROTOCOL_VERSION_DATA {
24981    type Message = MavMessage;
24982    const ID: u32 = 300u32;
24983    const NAME: &'static str = "PROTOCOL_VERSION";
24984    const EXTRA_CRC: u8 = 217u8;
24985    const ENCODED_LEN: usize = 22usize;
24986    fn deser(
24987        _version: MavlinkVersion,
24988        __input: &[u8],
24989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24990        let avail_len = __input.len();
24991        let mut payload_buf = [0; Self::ENCODED_LEN];
24992        let mut buf = if avail_len < Self::ENCODED_LEN {
24993            payload_buf[0..avail_len].copy_from_slice(__input);
24994            Bytes::new(&payload_buf)
24995        } else {
24996            Bytes::new(__input)
24997        };
24998        let mut __struct = Self::default();
24999        __struct.version = buf.get_u16_le();
25000        __struct.min_version = buf.get_u16_le();
25001        __struct.max_version = buf.get_u16_le();
25002        for v in &mut __struct.spec_version_hash {
25003            let val = buf.get_u8();
25004            *v = val;
25005        }
25006        for v in &mut __struct.library_version_hash {
25007            let val = buf.get_u8();
25008            *v = val;
25009        }
25010        Ok(__struct)
25011    }
25012    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25013        let mut __tmp = BytesMut::new(bytes);
25014        #[allow(clippy::absurd_extreme_comparisons)]
25015        #[allow(unused_comparisons)]
25016        if __tmp.remaining() < Self::ENCODED_LEN {
25017            panic!(
25018                "buffer is too small (need {} bytes, but got {})",
25019                Self::ENCODED_LEN,
25020                __tmp.remaining(),
25021            )
25022        }
25023        __tmp.put_u16_le(self.version);
25024        __tmp.put_u16_le(self.min_version);
25025        __tmp.put_u16_le(self.max_version);
25026        for val in &self.spec_version_hash {
25027            __tmp.put_u8(*val);
25028        }
25029        for val in &self.library_version_hash {
25030            __tmp.put_u8(*val);
25031        }
25032        if matches!(version, MavlinkVersion::V2) {
25033            let len = __tmp.len();
25034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25035        } else {
25036            __tmp.len()
25037        }
25038    }
25039}
25040#[doc = "Status generated by radio and injected into MAVLink stream."]
25041#[doc = ""]
25042#[doc = "ID: 109"]
25043#[derive(Debug, Clone, PartialEq)]
25044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25046#[cfg_attr(feature = "ts", derive(TS))]
25047#[cfg_attr(feature = "ts", ts(export))]
25048pub struct RADIO_STATUS_DATA {
25049    #[doc = "Count of radio packet receive errors (since boot)."]
25050    pub rxerrors: u16,
25051    #[doc = "Count of error corrected radio packets (since boot)."]
25052    pub fixed: u16,
25053    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25054    pub rssi: u8,
25055    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25056    pub remrssi: u8,
25057    #[doc = "Remaining free transmitter buffer space."]
25058    pub txbuf: u8,
25059    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25060    pub noise: u8,
25061    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25062    pub remnoise: u8,
25063}
25064impl RADIO_STATUS_DATA {
25065    pub const ENCODED_LEN: usize = 9usize;
25066    pub const DEFAULT: Self = Self {
25067        rxerrors: 0_u16,
25068        fixed: 0_u16,
25069        rssi: 0_u8,
25070        remrssi: 0_u8,
25071        txbuf: 0_u8,
25072        noise: 0_u8,
25073        remnoise: 0_u8,
25074    };
25075    #[cfg(feature = "arbitrary")]
25076    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25077        use arbitrary::{Arbitrary, Unstructured};
25078        let mut buf = [0u8; 1024];
25079        rng.fill_bytes(&mut buf);
25080        let mut unstructured = Unstructured::new(&buf);
25081        Self::arbitrary(&mut unstructured).unwrap_or_default()
25082    }
25083}
25084impl Default for RADIO_STATUS_DATA {
25085    fn default() -> Self {
25086        Self::DEFAULT.clone()
25087    }
25088}
25089impl MessageData for RADIO_STATUS_DATA {
25090    type Message = MavMessage;
25091    const ID: u32 = 109u32;
25092    const NAME: &'static str = "RADIO_STATUS";
25093    const EXTRA_CRC: u8 = 185u8;
25094    const ENCODED_LEN: usize = 9usize;
25095    fn deser(
25096        _version: MavlinkVersion,
25097        __input: &[u8],
25098    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25099        let avail_len = __input.len();
25100        let mut payload_buf = [0; Self::ENCODED_LEN];
25101        let mut buf = if avail_len < Self::ENCODED_LEN {
25102            payload_buf[0..avail_len].copy_from_slice(__input);
25103            Bytes::new(&payload_buf)
25104        } else {
25105            Bytes::new(__input)
25106        };
25107        let mut __struct = Self::default();
25108        __struct.rxerrors = buf.get_u16_le();
25109        __struct.fixed = buf.get_u16_le();
25110        __struct.rssi = buf.get_u8();
25111        __struct.remrssi = buf.get_u8();
25112        __struct.txbuf = buf.get_u8();
25113        __struct.noise = buf.get_u8();
25114        __struct.remnoise = buf.get_u8();
25115        Ok(__struct)
25116    }
25117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25118        let mut __tmp = BytesMut::new(bytes);
25119        #[allow(clippy::absurd_extreme_comparisons)]
25120        #[allow(unused_comparisons)]
25121        if __tmp.remaining() < Self::ENCODED_LEN {
25122            panic!(
25123                "buffer is too small (need {} bytes, but got {})",
25124                Self::ENCODED_LEN,
25125                __tmp.remaining(),
25126            )
25127        }
25128        __tmp.put_u16_le(self.rxerrors);
25129        __tmp.put_u16_le(self.fixed);
25130        __tmp.put_u8(self.rssi);
25131        __tmp.put_u8(self.remrssi);
25132        __tmp.put_u8(self.txbuf);
25133        __tmp.put_u8(self.noise);
25134        __tmp.put_u8(self.remnoise);
25135        if matches!(version, MavlinkVersion::V2) {
25136            let len = __tmp.len();
25137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25138        } else {
25139            __tmp.len()
25140        }
25141    }
25142}
25143#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25144#[doc = ""]
25145#[doc = "ID: 27"]
25146#[derive(Debug, Clone, PartialEq)]
25147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25149#[cfg_attr(feature = "ts", derive(TS))]
25150#[cfg_attr(feature = "ts", ts(export))]
25151pub struct RAW_IMU_DATA {
25152    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25153    pub time_usec: u64,
25154    #[doc = "X acceleration (raw)"]
25155    pub xacc: i16,
25156    #[doc = "Y acceleration (raw)"]
25157    pub yacc: i16,
25158    #[doc = "Z acceleration (raw)"]
25159    pub zacc: i16,
25160    #[doc = "Angular speed around X axis (raw)"]
25161    pub xgyro: i16,
25162    #[doc = "Angular speed around Y axis (raw)"]
25163    pub ygyro: i16,
25164    #[doc = "Angular speed around Z axis (raw)"]
25165    pub zgyro: i16,
25166    #[doc = "X Magnetic field (raw)"]
25167    pub xmag: i16,
25168    #[doc = "Y Magnetic field (raw)"]
25169    pub ymag: i16,
25170    #[doc = "Z Magnetic field (raw)"]
25171    pub zmag: i16,
25172    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25174    pub id: u8,
25175    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25177    pub temperature: i16,
25178}
25179impl RAW_IMU_DATA {
25180    pub const ENCODED_LEN: usize = 29usize;
25181    pub const DEFAULT: Self = Self {
25182        time_usec: 0_u64,
25183        xacc: 0_i16,
25184        yacc: 0_i16,
25185        zacc: 0_i16,
25186        xgyro: 0_i16,
25187        ygyro: 0_i16,
25188        zgyro: 0_i16,
25189        xmag: 0_i16,
25190        ymag: 0_i16,
25191        zmag: 0_i16,
25192        id: 0_u8,
25193        temperature: 0_i16,
25194    };
25195    #[cfg(feature = "arbitrary")]
25196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25197        use arbitrary::{Arbitrary, Unstructured};
25198        let mut buf = [0u8; 1024];
25199        rng.fill_bytes(&mut buf);
25200        let mut unstructured = Unstructured::new(&buf);
25201        Self::arbitrary(&mut unstructured).unwrap_or_default()
25202    }
25203}
25204impl Default for RAW_IMU_DATA {
25205    fn default() -> Self {
25206        Self::DEFAULT.clone()
25207    }
25208}
25209impl MessageData for RAW_IMU_DATA {
25210    type Message = MavMessage;
25211    const ID: u32 = 27u32;
25212    const NAME: &'static str = "RAW_IMU";
25213    const EXTRA_CRC: u8 = 144u8;
25214    const ENCODED_LEN: usize = 29usize;
25215    fn deser(
25216        _version: MavlinkVersion,
25217        __input: &[u8],
25218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25219        let avail_len = __input.len();
25220        let mut payload_buf = [0; Self::ENCODED_LEN];
25221        let mut buf = if avail_len < Self::ENCODED_LEN {
25222            payload_buf[0..avail_len].copy_from_slice(__input);
25223            Bytes::new(&payload_buf)
25224        } else {
25225            Bytes::new(__input)
25226        };
25227        let mut __struct = Self::default();
25228        __struct.time_usec = buf.get_u64_le();
25229        __struct.xacc = buf.get_i16_le();
25230        __struct.yacc = buf.get_i16_le();
25231        __struct.zacc = buf.get_i16_le();
25232        __struct.xgyro = buf.get_i16_le();
25233        __struct.ygyro = buf.get_i16_le();
25234        __struct.zgyro = buf.get_i16_le();
25235        __struct.xmag = buf.get_i16_le();
25236        __struct.ymag = buf.get_i16_le();
25237        __struct.zmag = buf.get_i16_le();
25238        __struct.id = buf.get_u8();
25239        __struct.temperature = buf.get_i16_le();
25240        Ok(__struct)
25241    }
25242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25243        let mut __tmp = BytesMut::new(bytes);
25244        #[allow(clippy::absurd_extreme_comparisons)]
25245        #[allow(unused_comparisons)]
25246        if __tmp.remaining() < Self::ENCODED_LEN {
25247            panic!(
25248                "buffer is too small (need {} bytes, but got {})",
25249                Self::ENCODED_LEN,
25250                __tmp.remaining(),
25251            )
25252        }
25253        __tmp.put_u64_le(self.time_usec);
25254        __tmp.put_i16_le(self.xacc);
25255        __tmp.put_i16_le(self.yacc);
25256        __tmp.put_i16_le(self.zacc);
25257        __tmp.put_i16_le(self.xgyro);
25258        __tmp.put_i16_le(self.ygyro);
25259        __tmp.put_i16_le(self.zgyro);
25260        __tmp.put_i16_le(self.xmag);
25261        __tmp.put_i16_le(self.ymag);
25262        __tmp.put_i16_le(self.zmag);
25263        if matches!(version, MavlinkVersion::V2) {
25264            __tmp.put_u8(self.id);
25265            __tmp.put_i16_le(self.temperature);
25266            let len = __tmp.len();
25267            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25268        } else {
25269            __tmp.len()
25270        }
25271    }
25272}
25273#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25274#[doc = ""]
25275#[doc = "ID: 28"]
25276#[derive(Debug, Clone, PartialEq)]
25277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25279#[cfg_attr(feature = "ts", derive(TS))]
25280#[cfg_attr(feature = "ts", ts(export))]
25281pub struct RAW_PRESSURE_DATA {
25282    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25283    pub time_usec: u64,
25284    #[doc = "Absolute pressure (raw)"]
25285    pub press_abs: i16,
25286    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25287    pub press_diff1: i16,
25288    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25289    pub press_diff2: i16,
25290    #[doc = "Raw Temperature measurement (raw)"]
25291    pub temperature: i16,
25292}
25293impl RAW_PRESSURE_DATA {
25294    pub const ENCODED_LEN: usize = 16usize;
25295    pub const DEFAULT: Self = Self {
25296        time_usec: 0_u64,
25297        press_abs: 0_i16,
25298        press_diff1: 0_i16,
25299        press_diff2: 0_i16,
25300        temperature: 0_i16,
25301    };
25302    #[cfg(feature = "arbitrary")]
25303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25304        use arbitrary::{Arbitrary, Unstructured};
25305        let mut buf = [0u8; 1024];
25306        rng.fill_bytes(&mut buf);
25307        let mut unstructured = Unstructured::new(&buf);
25308        Self::arbitrary(&mut unstructured).unwrap_or_default()
25309    }
25310}
25311impl Default for RAW_PRESSURE_DATA {
25312    fn default() -> Self {
25313        Self::DEFAULT.clone()
25314    }
25315}
25316impl MessageData for RAW_PRESSURE_DATA {
25317    type Message = MavMessage;
25318    const ID: u32 = 28u32;
25319    const NAME: &'static str = "RAW_PRESSURE";
25320    const EXTRA_CRC: u8 = 67u8;
25321    const ENCODED_LEN: usize = 16usize;
25322    fn deser(
25323        _version: MavlinkVersion,
25324        __input: &[u8],
25325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25326        let avail_len = __input.len();
25327        let mut payload_buf = [0; Self::ENCODED_LEN];
25328        let mut buf = if avail_len < Self::ENCODED_LEN {
25329            payload_buf[0..avail_len].copy_from_slice(__input);
25330            Bytes::new(&payload_buf)
25331        } else {
25332            Bytes::new(__input)
25333        };
25334        let mut __struct = Self::default();
25335        __struct.time_usec = buf.get_u64_le();
25336        __struct.press_abs = buf.get_i16_le();
25337        __struct.press_diff1 = buf.get_i16_le();
25338        __struct.press_diff2 = buf.get_i16_le();
25339        __struct.temperature = buf.get_i16_le();
25340        Ok(__struct)
25341    }
25342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25343        let mut __tmp = BytesMut::new(bytes);
25344        #[allow(clippy::absurd_extreme_comparisons)]
25345        #[allow(unused_comparisons)]
25346        if __tmp.remaining() < Self::ENCODED_LEN {
25347            panic!(
25348                "buffer is too small (need {} bytes, but got {})",
25349                Self::ENCODED_LEN,
25350                __tmp.remaining(),
25351            )
25352        }
25353        __tmp.put_u64_le(self.time_usec);
25354        __tmp.put_i16_le(self.press_abs);
25355        __tmp.put_i16_le(self.press_diff1);
25356        __tmp.put_i16_le(self.press_diff2);
25357        __tmp.put_i16_le(self.temperature);
25358        if matches!(version, MavlinkVersion::V2) {
25359            let len = __tmp.len();
25360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25361        } else {
25362            __tmp.len()
25363        }
25364    }
25365}
25366#[doc = "RPM sensor data message."]
25367#[doc = ""]
25368#[doc = "ID: 339"]
25369#[derive(Debug, Clone, PartialEq)]
25370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25372#[cfg_attr(feature = "ts", derive(TS))]
25373#[cfg_attr(feature = "ts", ts(export))]
25374pub struct RAW_RPM_DATA {
25375    #[doc = "Indicated rate"]
25376    pub frequency: f32,
25377    #[doc = "Index of this RPM sensor (0-indexed)"]
25378    pub index: u8,
25379}
25380impl RAW_RPM_DATA {
25381    pub const ENCODED_LEN: usize = 5usize;
25382    pub const DEFAULT: Self = Self {
25383        frequency: 0.0_f32,
25384        index: 0_u8,
25385    };
25386    #[cfg(feature = "arbitrary")]
25387    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25388        use arbitrary::{Arbitrary, Unstructured};
25389        let mut buf = [0u8; 1024];
25390        rng.fill_bytes(&mut buf);
25391        let mut unstructured = Unstructured::new(&buf);
25392        Self::arbitrary(&mut unstructured).unwrap_or_default()
25393    }
25394}
25395impl Default for RAW_RPM_DATA {
25396    fn default() -> Self {
25397        Self::DEFAULT.clone()
25398    }
25399}
25400impl MessageData for RAW_RPM_DATA {
25401    type Message = MavMessage;
25402    const ID: u32 = 339u32;
25403    const NAME: &'static str = "RAW_RPM";
25404    const EXTRA_CRC: u8 = 199u8;
25405    const ENCODED_LEN: usize = 5usize;
25406    fn deser(
25407        _version: MavlinkVersion,
25408        __input: &[u8],
25409    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25410        let avail_len = __input.len();
25411        let mut payload_buf = [0; Self::ENCODED_LEN];
25412        let mut buf = if avail_len < Self::ENCODED_LEN {
25413            payload_buf[0..avail_len].copy_from_slice(__input);
25414            Bytes::new(&payload_buf)
25415        } else {
25416            Bytes::new(__input)
25417        };
25418        let mut __struct = Self::default();
25419        __struct.frequency = buf.get_f32_le();
25420        __struct.index = buf.get_u8();
25421        Ok(__struct)
25422    }
25423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25424        let mut __tmp = BytesMut::new(bytes);
25425        #[allow(clippy::absurd_extreme_comparisons)]
25426        #[allow(unused_comparisons)]
25427        if __tmp.remaining() < Self::ENCODED_LEN {
25428            panic!(
25429                "buffer is too small (need {} bytes, but got {})",
25430                Self::ENCODED_LEN,
25431                __tmp.remaining(),
25432            )
25433        }
25434        __tmp.put_f32_le(self.frequency);
25435        __tmp.put_u8(self.index);
25436        if matches!(version, MavlinkVersion::V2) {
25437            let len = __tmp.len();
25438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25439        } else {
25440            __tmp.len()
25441        }
25442    }
25443}
25444#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25445#[doc = ""]
25446#[doc = "ID: 65"]
25447#[derive(Debug, Clone, PartialEq)]
25448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25450#[cfg_attr(feature = "ts", derive(TS))]
25451#[cfg_attr(feature = "ts", ts(export))]
25452pub struct RC_CHANNELS_DATA {
25453    #[doc = "Timestamp (time since system boot)."]
25454    pub time_boot_ms: u32,
25455    #[doc = "RC channel 1 value."]
25456    pub chan1_raw: u16,
25457    #[doc = "RC channel 2 value."]
25458    pub chan2_raw: u16,
25459    #[doc = "RC channel 3 value."]
25460    pub chan3_raw: u16,
25461    #[doc = "RC channel 4 value."]
25462    pub chan4_raw: u16,
25463    #[doc = "RC channel 5 value."]
25464    pub chan5_raw: u16,
25465    #[doc = "RC channel 6 value."]
25466    pub chan6_raw: u16,
25467    #[doc = "RC channel 7 value."]
25468    pub chan7_raw: u16,
25469    #[doc = "RC channel 8 value."]
25470    pub chan8_raw: u16,
25471    #[doc = "RC channel 9 value."]
25472    pub chan9_raw: u16,
25473    #[doc = "RC channel 10 value."]
25474    pub chan10_raw: u16,
25475    #[doc = "RC channel 11 value."]
25476    pub chan11_raw: u16,
25477    #[doc = "RC channel 12 value."]
25478    pub chan12_raw: u16,
25479    #[doc = "RC channel 13 value."]
25480    pub chan13_raw: u16,
25481    #[doc = "RC channel 14 value."]
25482    pub chan14_raw: u16,
25483    #[doc = "RC channel 15 value."]
25484    pub chan15_raw: u16,
25485    #[doc = "RC channel 16 value."]
25486    pub chan16_raw: u16,
25487    #[doc = "RC channel 17 value."]
25488    pub chan17_raw: u16,
25489    #[doc = "RC channel 18 value."]
25490    pub chan18_raw: u16,
25491    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25492    pub chancount: u8,
25493    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25494    pub rssi: u8,
25495}
25496impl RC_CHANNELS_DATA {
25497    pub const ENCODED_LEN: usize = 42usize;
25498    pub const DEFAULT: Self = Self {
25499        time_boot_ms: 0_u32,
25500        chan1_raw: 0_u16,
25501        chan2_raw: 0_u16,
25502        chan3_raw: 0_u16,
25503        chan4_raw: 0_u16,
25504        chan5_raw: 0_u16,
25505        chan6_raw: 0_u16,
25506        chan7_raw: 0_u16,
25507        chan8_raw: 0_u16,
25508        chan9_raw: 0_u16,
25509        chan10_raw: 0_u16,
25510        chan11_raw: 0_u16,
25511        chan12_raw: 0_u16,
25512        chan13_raw: 0_u16,
25513        chan14_raw: 0_u16,
25514        chan15_raw: 0_u16,
25515        chan16_raw: 0_u16,
25516        chan17_raw: 0_u16,
25517        chan18_raw: 0_u16,
25518        chancount: 0_u8,
25519        rssi: 0_u8,
25520    };
25521    #[cfg(feature = "arbitrary")]
25522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25523        use arbitrary::{Arbitrary, Unstructured};
25524        let mut buf = [0u8; 1024];
25525        rng.fill_bytes(&mut buf);
25526        let mut unstructured = Unstructured::new(&buf);
25527        Self::arbitrary(&mut unstructured).unwrap_or_default()
25528    }
25529}
25530impl Default for RC_CHANNELS_DATA {
25531    fn default() -> Self {
25532        Self::DEFAULT.clone()
25533    }
25534}
25535impl MessageData for RC_CHANNELS_DATA {
25536    type Message = MavMessage;
25537    const ID: u32 = 65u32;
25538    const NAME: &'static str = "RC_CHANNELS";
25539    const EXTRA_CRC: u8 = 118u8;
25540    const ENCODED_LEN: usize = 42usize;
25541    fn deser(
25542        _version: MavlinkVersion,
25543        __input: &[u8],
25544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25545        let avail_len = __input.len();
25546        let mut payload_buf = [0; Self::ENCODED_LEN];
25547        let mut buf = if avail_len < Self::ENCODED_LEN {
25548            payload_buf[0..avail_len].copy_from_slice(__input);
25549            Bytes::new(&payload_buf)
25550        } else {
25551            Bytes::new(__input)
25552        };
25553        let mut __struct = Self::default();
25554        __struct.time_boot_ms = buf.get_u32_le();
25555        __struct.chan1_raw = buf.get_u16_le();
25556        __struct.chan2_raw = buf.get_u16_le();
25557        __struct.chan3_raw = buf.get_u16_le();
25558        __struct.chan4_raw = buf.get_u16_le();
25559        __struct.chan5_raw = buf.get_u16_le();
25560        __struct.chan6_raw = buf.get_u16_le();
25561        __struct.chan7_raw = buf.get_u16_le();
25562        __struct.chan8_raw = buf.get_u16_le();
25563        __struct.chan9_raw = buf.get_u16_le();
25564        __struct.chan10_raw = buf.get_u16_le();
25565        __struct.chan11_raw = buf.get_u16_le();
25566        __struct.chan12_raw = buf.get_u16_le();
25567        __struct.chan13_raw = buf.get_u16_le();
25568        __struct.chan14_raw = buf.get_u16_le();
25569        __struct.chan15_raw = buf.get_u16_le();
25570        __struct.chan16_raw = buf.get_u16_le();
25571        __struct.chan17_raw = buf.get_u16_le();
25572        __struct.chan18_raw = buf.get_u16_le();
25573        __struct.chancount = buf.get_u8();
25574        __struct.rssi = buf.get_u8();
25575        Ok(__struct)
25576    }
25577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25578        let mut __tmp = BytesMut::new(bytes);
25579        #[allow(clippy::absurd_extreme_comparisons)]
25580        #[allow(unused_comparisons)]
25581        if __tmp.remaining() < Self::ENCODED_LEN {
25582            panic!(
25583                "buffer is too small (need {} bytes, but got {})",
25584                Self::ENCODED_LEN,
25585                __tmp.remaining(),
25586            )
25587        }
25588        __tmp.put_u32_le(self.time_boot_ms);
25589        __tmp.put_u16_le(self.chan1_raw);
25590        __tmp.put_u16_le(self.chan2_raw);
25591        __tmp.put_u16_le(self.chan3_raw);
25592        __tmp.put_u16_le(self.chan4_raw);
25593        __tmp.put_u16_le(self.chan5_raw);
25594        __tmp.put_u16_le(self.chan6_raw);
25595        __tmp.put_u16_le(self.chan7_raw);
25596        __tmp.put_u16_le(self.chan8_raw);
25597        __tmp.put_u16_le(self.chan9_raw);
25598        __tmp.put_u16_le(self.chan10_raw);
25599        __tmp.put_u16_le(self.chan11_raw);
25600        __tmp.put_u16_le(self.chan12_raw);
25601        __tmp.put_u16_le(self.chan13_raw);
25602        __tmp.put_u16_le(self.chan14_raw);
25603        __tmp.put_u16_le(self.chan15_raw);
25604        __tmp.put_u16_le(self.chan16_raw);
25605        __tmp.put_u16_le(self.chan17_raw);
25606        __tmp.put_u16_le(self.chan18_raw);
25607        __tmp.put_u8(self.chancount);
25608        __tmp.put_u8(self.rssi);
25609        if matches!(version, MavlinkVersion::V2) {
25610            let len = __tmp.len();
25611            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25612        } else {
25613            __tmp.len()
25614        }
25615    }
25616}
25617#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25618#[doc = ""]
25619#[doc = "ID: 70"]
25620#[derive(Debug, Clone, PartialEq)]
25621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25623#[cfg_attr(feature = "ts", derive(TS))]
25624#[cfg_attr(feature = "ts", ts(export))]
25625pub struct RC_CHANNELS_OVERRIDE_DATA {
25626    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25627    pub chan1_raw: u16,
25628    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25629    pub chan2_raw: u16,
25630    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25631    pub chan3_raw: u16,
25632    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25633    pub chan4_raw: u16,
25634    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25635    pub chan5_raw: u16,
25636    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25637    pub chan6_raw: u16,
25638    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25639    pub chan7_raw: u16,
25640    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25641    pub chan8_raw: u16,
25642    #[doc = "System ID"]
25643    pub target_system: u8,
25644    #[doc = "Component ID"]
25645    pub target_component: u8,
25646    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25648    pub chan9_raw: u16,
25649    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25650    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25651    pub chan10_raw: u16,
25652    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25654    pub chan11_raw: u16,
25655    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25657    pub chan12_raw: u16,
25658    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25660    pub chan13_raw: u16,
25661    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25662    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25663    pub chan14_raw: u16,
25664    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25666    pub chan15_raw: u16,
25667    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25668    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25669    pub chan16_raw: u16,
25670    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25671    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25672    pub chan17_raw: u16,
25673    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25674    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25675    pub chan18_raw: u16,
25676}
25677impl RC_CHANNELS_OVERRIDE_DATA {
25678    pub const ENCODED_LEN: usize = 38usize;
25679    pub const DEFAULT: Self = Self {
25680        chan1_raw: 0_u16,
25681        chan2_raw: 0_u16,
25682        chan3_raw: 0_u16,
25683        chan4_raw: 0_u16,
25684        chan5_raw: 0_u16,
25685        chan6_raw: 0_u16,
25686        chan7_raw: 0_u16,
25687        chan8_raw: 0_u16,
25688        target_system: 0_u8,
25689        target_component: 0_u8,
25690        chan9_raw: 0_u16,
25691        chan10_raw: 0_u16,
25692        chan11_raw: 0_u16,
25693        chan12_raw: 0_u16,
25694        chan13_raw: 0_u16,
25695        chan14_raw: 0_u16,
25696        chan15_raw: 0_u16,
25697        chan16_raw: 0_u16,
25698        chan17_raw: 0_u16,
25699        chan18_raw: 0_u16,
25700    };
25701    #[cfg(feature = "arbitrary")]
25702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25703        use arbitrary::{Arbitrary, Unstructured};
25704        let mut buf = [0u8; 1024];
25705        rng.fill_bytes(&mut buf);
25706        let mut unstructured = Unstructured::new(&buf);
25707        Self::arbitrary(&mut unstructured).unwrap_or_default()
25708    }
25709}
25710impl Default for RC_CHANNELS_OVERRIDE_DATA {
25711    fn default() -> Self {
25712        Self::DEFAULT.clone()
25713    }
25714}
25715impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25716    type Message = MavMessage;
25717    const ID: u32 = 70u32;
25718    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25719    const EXTRA_CRC: u8 = 124u8;
25720    const ENCODED_LEN: usize = 38usize;
25721    fn deser(
25722        _version: MavlinkVersion,
25723        __input: &[u8],
25724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25725        let avail_len = __input.len();
25726        let mut payload_buf = [0; Self::ENCODED_LEN];
25727        let mut buf = if avail_len < Self::ENCODED_LEN {
25728            payload_buf[0..avail_len].copy_from_slice(__input);
25729            Bytes::new(&payload_buf)
25730        } else {
25731            Bytes::new(__input)
25732        };
25733        let mut __struct = Self::default();
25734        __struct.chan1_raw = buf.get_u16_le();
25735        __struct.chan2_raw = buf.get_u16_le();
25736        __struct.chan3_raw = buf.get_u16_le();
25737        __struct.chan4_raw = buf.get_u16_le();
25738        __struct.chan5_raw = buf.get_u16_le();
25739        __struct.chan6_raw = buf.get_u16_le();
25740        __struct.chan7_raw = buf.get_u16_le();
25741        __struct.chan8_raw = buf.get_u16_le();
25742        __struct.target_system = buf.get_u8();
25743        __struct.target_component = buf.get_u8();
25744        __struct.chan9_raw = buf.get_u16_le();
25745        __struct.chan10_raw = buf.get_u16_le();
25746        __struct.chan11_raw = buf.get_u16_le();
25747        __struct.chan12_raw = buf.get_u16_le();
25748        __struct.chan13_raw = buf.get_u16_le();
25749        __struct.chan14_raw = buf.get_u16_le();
25750        __struct.chan15_raw = buf.get_u16_le();
25751        __struct.chan16_raw = buf.get_u16_le();
25752        __struct.chan17_raw = buf.get_u16_le();
25753        __struct.chan18_raw = buf.get_u16_le();
25754        Ok(__struct)
25755    }
25756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25757        let mut __tmp = BytesMut::new(bytes);
25758        #[allow(clippy::absurd_extreme_comparisons)]
25759        #[allow(unused_comparisons)]
25760        if __tmp.remaining() < Self::ENCODED_LEN {
25761            panic!(
25762                "buffer is too small (need {} bytes, but got {})",
25763                Self::ENCODED_LEN,
25764                __tmp.remaining(),
25765            )
25766        }
25767        __tmp.put_u16_le(self.chan1_raw);
25768        __tmp.put_u16_le(self.chan2_raw);
25769        __tmp.put_u16_le(self.chan3_raw);
25770        __tmp.put_u16_le(self.chan4_raw);
25771        __tmp.put_u16_le(self.chan5_raw);
25772        __tmp.put_u16_le(self.chan6_raw);
25773        __tmp.put_u16_le(self.chan7_raw);
25774        __tmp.put_u16_le(self.chan8_raw);
25775        __tmp.put_u8(self.target_system);
25776        __tmp.put_u8(self.target_component);
25777        if matches!(version, MavlinkVersion::V2) {
25778            __tmp.put_u16_le(self.chan9_raw);
25779            __tmp.put_u16_le(self.chan10_raw);
25780            __tmp.put_u16_le(self.chan11_raw);
25781            __tmp.put_u16_le(self.chan12_raw);
25782            __tmp.put_u16_le(self.chan13_raw);
25783            __tmp.put_u16_le(self.chan14_raw);
25784            __tmp.put_u16_le(self.chan15_raw);
25785            __tmp.put_u16_le(self.chan16_raw);
25786            __tmp.put_u16_le(self.chan17_raw);
25787            __tmp.put_u16_le(self.chan18_raw);
25788            let len = __tmp.len();
25789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25790        } else {
25791            __tmp.len()
25792        }
25793    }
25794}
25795#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25796#[doc = ""]
25797#[doc = "ID: 35"]
25798#[derive(Debug, Clone, PartialEq)]
25799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25801#[cfg_attr(feature = "ts", derive(TS))]
25802#[cfg_attr(feature = "ts", ts(export))]
25803pub struct RC_CHANNELS_RAW_DATA {
25804    #[doc = "Timestamp (time since system boot)."]
25805    pub time_boot_ms: u32,
25806    #[doc = "RC channel 1 value."]
25807    pub chan1_raw: u16,
25808    #[doc = "RC channel 2 value."]
25809    pub chan2_raw: u16,
25810    #[doc = "RC channel 3 value."]
25811    pub chan3_raw: u16,
25812    #[doc = "RC channel 4 value."]
25813    pub chan4_raw: u16,
25814    #[doc = "RC channel 5 value."]
25815    pub chan5_raw: u16,
25816    #[doc = "RC channel 6 value."]
25817    pub chan6_raw: u16,
25818    #[doc = "RC channel 7 value."]
25819    pub chan7_raw: u16,
25820    #[doc = "RC channel 8 value."]
25821    pub chan8_raw: u16,
25822    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25823    pub port: u8,
25824    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25825    pub rssi: u8,
25826}
25827impl RC_CHANNELS_RAW_DATA {
25828    pub const ENCODED_LEN: usize = 22usize;
25829    pub const DEFAULT: Self = Self {
25830        time_boot_ms: 0_u32,
25831        chan1_raw: 0_u16,
25832        chan2_raw: 0_u16,
25833        chan3_raw: 0_u16,
25834        chan4_raw: 0_u16,
25835        chan5_raw: 0_u16,
25836        chan6_raw: 0_u16,
25837        chan7_raw: 0_u16,
25838        chan8_raw: 0_u16,
25839        port: 0_u8,
25840        rssi: 0_u8,
25841    };
25842    #[cfg(feature = "arbitrary")]
25843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25844        use arbitrary::{Arbitrary, Unstructured};
25845        let mut buf = [0u8; 1024];
25846        rng.fill_bytes(&mut buf);
25847        let mut unstructured = Unstructured::new(&buf);
25848        Self::arbitrary(&mut unstructured).unwrap_or_default()
25849    }
25850}
25851impl Default for RC_CHANNELS_RAW_DATA {
25852    fn default() -> Self {
25853        Self::DEFAULT.clone()
25854    }
25855}
25856impl MessageData for RC_CHANNELS_RAW_DATA {
25857    type Message = MavMessage;
25858    const ID: u32 = 35u32;
25859    const NAME: &'static str = "RC_CHANNELS_RAW";
25860    const EXTRA_CRC: u8 = 244u8;
25861    const ENCODED_LEN: usize = 22usize;
25862    fn deser(
25863        _version: MavlinkVersion,
25864        __input: &[u8],
25865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25866        let avail_len = __input.len();
25867        let mut payload_buf = [0; Self::ENCODED_LEN];
25868        let mut buf = if avail_len < Self::ENCODED_LEN {
25869            payload_buf[0..avail_len].copy_from_slice(__input);
25870            Bytes::new(&payload_buf)
25871        } else {
25872            Bytes::new(__input)
25873        };
25874        let mut __struct = Self::default();
25875        __struct.time_boot_ms = buf.get_u32_le();
25876        __struct.chan1_raw = buf.get_u16_le();
25877        __struct.chan2_raw = buf.get_u16_le();
25878        __struct.chan3_raw = buf.get_u16_le();
25879        __struct.chan4_raw = buf.get_u16_le();
25880        __struct.chan5_raw = buf.get_u16_le();
25881        __struct.chan6_raw = buf.get_u16_le();
25882        __struct.chan7_raw = buf.get_u16_le();
25883        __struct.chan8_raw = buf.get_u16_le();
25884        __struct.port = buf.get_u8();
25885        __struct.rssi = buf.get_u8();
25886        Ok(__struct)
25887    }
25888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25889        let mut __tmp = BytesMut::new(bytes);
25890        #[allow(clippy::absurd_extreme_comparisons)]
25891        #[allow(unused_comparisons)]
25892        if __tmp.remaining() < Self::ENCODED_LEN {
25893            panic!(
25894                "buffer is too small (need {} bytes, but got {})",
25895                Self::ENCODED_LEN,
25896                __tmp.remaining(),
25897            )
25898        }
25899        __tmp.put_u32_le(self.time_boot_ms);
25900        __tmp.put_u16_le(self.chan1_raw);
25901        __tmp.put_u16_le(self.chan2_raw);
25902        __tmp.put_u16_le(self.chan3_raw);
25903        __tmp.put_u16_le(self.chan4_raw);
25904        __tmp.put_u16_le(self.chan5_raw);
25905        __tmp.put_u16_le(self.chan6_raw);
25906        __tmp.put_u16_le(self.chan7_raw);
25907        __tmp.put_u16_le(self.chan8_raw);
25908        __tmp.put_u8(self.port);
25909        __tmp.put_u8(self.rssi);
25910        if matches!(version, MavlinkVersion::V2) {
25911            let len = __tmp.len();
25912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25913        } else {
25914            __tmp.len()
25915        }
25916    }
25917}
25918#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25919#[doc = ""]
25920#[doc = "ID: 34"]
25921#[derive(Debug, Clone, PartialEq)]
25922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25924#[cfg_attr(feature = "ts", derive(TS))]
25925#[cfg_attr(feature = "ts", ts(export))]
25926pub struct RC_CHANNELS_SCALED_DATA {
25927    #[doc = "Timestamp (time since system boot)."]
25928    pub time_boot_ms: u32,
25929    #[doc = "RC channel 1 value scaled."]
25930    pub chan1_scaled: i16,
25931    #[doc = "RC channel 2 value scaled."]
25932    pub chan2_scaled: i16,
25933    #[doc = "RC channel 3 value scaled."]
25934    pub chan3_scaled: i16,
25935    #[doc = "RC channel 4 value scaled."]
25936    pub chan4_scaled: i16,
25937    #[doc = "RC channel 5 value scaled."]
25938    pub chan5_scaled: i16,
25939    #[doc = "RC channel 6 value scaled."]
25940    pub chan6_scaled: i16,
25941    #[doc = "RC channel 7 value scaled."]
25942    pub chan7_scaled: i16,
25943    #[doc = "RC channel 8 value scaled."]
25944    pub chan8_scaled: i16,
25945    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25946    pub port: u8,
25947    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25948    pub rssi: u8,
25949}
25950impl RC_CHANNELS_SCALED_DATA {
25951    pub const ENCODED_LEN: usize = 22usize;
25952    pub const DEFAULT: Self = Self {
25953        time_boot_ms: 0_u32,
25954        chan1_scaled: 0_i16,
25955        chan2_scaled: 0_i16,
25956        chan3_scaled: 0_i16,
25957        chan4_scaled: 0_i16,
25958        chan5_scaled: 0_i16,
25959        chan6_scaled: 0_i16,
25960        chan7_scaled: 0_i16,
25961        chan8_scaled: 0_i16,
25962        port: 0_u8,
25963        rssi: 0_u8,
25964    };
25965    #[cfg(feature = "arbitrary")]
25966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25967        use arbitrary::{Arbitrary, Unstructured};
25968        let mut buf = [0u8; 1024];
25969        rng.fill_bytes(&mut buf);
25970        let mut unstructured = Unstructured::new(&buf);
25971        Self::arbitrary(&mut unstructured).unwrap_or_default()
25972    }
25973}
25974impl Default for RC_CHANNELS_SCALED_DATA {
25975    fn default() -> Self {
25976        Self::DEFAULT.clone()
25977    }
25978}
25979impl MessageData for RC_CHANNELS_SCALED_DATA {
25980    type Message = MavMessage;
25981    const ID: u32 = 34u32;
25982    const NAME: &'static str = "RC_CHANNELS_SCALED";
25983    const EXTRA_CRC: u8 = 237u8;
25984    const ENCODED_LEN: usize = 22usize;
25985    fn deser(
25986        _version: MavlinkVersion,
25987        __input: &[u8],
25988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25989        let avail_len = __input.len();
25990        let mut payload_buf = [0; Self::ENCODED_LEN];
25991        let mut buf = if avail_len < Self::ENCODED_LEN {
25992            payload_buf[0..avail_len].copy_from_slice(__input);
25993            Bytes::new(&payload_buf)
25994        } else {
25995            Bytes::new(__input)
25996        };
25997        let mut __struct = Self::default();
25998        __struct.time_boot_ms = buf.get_u32_le();
25999        __struct.chan1_scaled = buf.get_i16_le();
26000        __struct.chan2_scaled = buf.get_i16_le();
26001        __struct.chan3_scaled = buf.get_i16_le();
26002        __struct.chan4_scaled = buf.get_i16_le();
26003        __struct.chan5_scaled = buf.get_i16_le();
26004        __struct.chan6_scaled = buf.get_i16_le();
26005        __struct.chan7_scaled = buf.get_i16_le();
26006        __struct.chan8_scaled = buf.get_i16_le();
26007        __struct.port = buf.get_u8();
26008        __struct.rssi = buf.get_u8();
26009        Ok(__struct)
26010    }
26011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26012        let mut __tmp = BytesMut::new(bytes);
26013        #[allow(clippy::absurd_extreme_comparisons)]
26014        #[allow(unused_comparisons)]
26015        if __tmp.remaining() < Self::ENCODED_LEN {
26016            panic!(
26017                "buffer is too small (need {} bytes, but got {})",
26018                Self::ENCODED_LEN,
26019                __tmp.remaining(),
26020            )
26021        }
26022        __tmp.put_u32_le(self.time_boot_ms);
26023        __tmp.put_i16_le(self.chan1_scaled);
26024        __tmp.put_i16_le(self.chan2_scaled);
26025        __tmp.put_i16_le(self.chan3_scaled);
26026        __tmp.put_i16_le(self.chan4_scaled);
26027        __tmp.put_i16_le(self.chan5_scaled);
26028        __tmp.put_i16_le(self.chan6_scaled);
26029        __tmp.put_i16_le(self.chan7_scaled);
26030        __tmp.put_i16_le(self.chan8_scaled);
26031        __tmp.put_u8(self.port);
26032        __tmp.put_u8(self.rssi);
26033        if matches!(version, MavlinkVersion::V2) {
26034            let len = __tmp.len();
26035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26036        } else {
26037            __tmp.len()
26038        }
26039    }
26040}
26041#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26042#[doc = "Request a data stream."]
26043#[doc = ""]
26044#[doc = "ID: 66"]
26045#[derive(Debug, Clone, PartialEq)]
26046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26048#[cfg_attr(feature = "ts", derive(TS))]
26049#[cfg_attr(feature = "ts", ts(export))]
26050pub struct REQUEST_DATA_STREAM_DATA {
26051    #[doc = "The requested message rate"]
26052    pub req_message_rate: u16,
26053    #[doc = "The target requested to send the message stream."]
26054    pub target_system: u8,
26055    #[doc = "The target requested to send the message stream."]
26056    pub target_component: u8,
26057    #[doc = "The ID of the requested data stream"]
26058    pub req_stream_id: u8,
26059    #[doc = "1 to start sending, 0 to stop sending."]
26060    pub start_stop: u8,
26061}
26062impl REQUEST_DATA_STREAM_DATA {
26063    pub const ENCODED_LEN: usize = 6usize;
26064    pub const DEFAULT: Self = Self {
26065        req_message_rate: 0_u16,
26066        target_system: 0_u8,
26067        target_component: 0_u8,
26068        req_stream_id: 0_u8,
26069        start_stop: 0_u8,
26070    };
26071    #[cfg(feature = "arbitrary")]
26072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26073        use arbitrary::{Arbitrary, Unstructured};
26074        let mut buf = [0u8; 1024];
26075        rng.fill_bytes(&mut buf);
26076        let mut unstructured = Unstructured::new(&buf);
26077        Self::arbitrary(&mut unstructured).unwrap_or_default()
26078    }
26079}
26080impl Default for REQUEST_DATA_STREAM_DATA {
26081    fn default() -> Self {
26082        Self::DEFAULT.clone()
26083    }
26084}
26085impl MessageData for REQUEST_DATA_STREAM_DATA {
26086    type Message = MavMessage;
26087    const ID: u32 = 66u32;
26088    const NAME: &'static str = "REQUEST_DATA_STREAM";
26089    const EXTRA_CRC: u8 = 148u8;
26090    const ENCODED_LEN: usize = 6usize;
26091    fn deser(
26092        _version: MavlinkVersion,
26093        __input: &[u8],
26094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26095        let avail_len = __input.len();
26096        let mut payload_buf = [0; Self::ENCODED_LEN];
26097        let mut buf = if avail_len < Self::ENCODED_LEN {
26098            payload_buf[0..avail_len].copy_from_slice(__input);
26099            Bytes::new(&payload_buf)
26100        } else {
26101            Bytes::new(__input)
26102        };
26103        let mut __struct = Self::default();
26104        __struct.req_message_rate = buf.get_u16_le();
26105        __struct.target_system = buf.get_u8();
26106        __struct.target_component = buf.get_u8();
26107        __struct.req_stream_id = buf.get_u8();
26108        __struct.start_stop = buf.get_u8();
26109        Ok(__struct)
26110    }
26111    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26112        let mut __tmp = BytesMut::new(bytes);
26113        #[allow(clippy::absurd_extreme_comparisons)]
26114        #[allow(unused_comparisons)]
26115        if __tmp.remaining() < Self::ENCODED_LEN {
26116            panic!(
26117                "buffer is too small (need {} bytes, but got {})",
26118                Self::ENCODED_LEN,
26119                __tmp.remaining(),
26120            )
26121        }
26122        __tmp.put_u16_le(self.req_message_rate);
26123        __tmp.put_u8(self.target_system);
26124        __tmp.put_u8(self.target_component);
26125        __tmp.put_u8(self.req_stream_id);
26126        __tmp.put_u8(self.start_stop);
26127        if matches!(version, MavlinkVersion::V2) {
26128            let len = __tmp.len();
26129            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26130        } else {
26131            __tmp.len()
26132        }
26133    }
26134}
26135#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26136#[doc = ""]
26137#[doc = "ID: 412"]
26138#[derive(Debug, Clone, PartialEq)]
26139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26141#[cfg_attr(feature = "ts", derive(TS))]
26142#[cfg_attr(feature = "ts", ts(export))]
26143pub struct REQUEST_EVENT_DATA {
26144    #[doc = "First sequence number of the requested event."]
26145    pub first_sequence: u16,
26146    #[doc = "Last sequence number of the requested event."]
26147    pub last_sequence: u16,
26148    #[doc = "System ID"]
26149    pub target_system: u8,
26150    #[doc = "Component ID"]
26151    pub target_component: u8,
26152}
26153impl REQUEST_EVENT_DATA {
26154    pub const ENCODED_LEN: usize = 6usize;
26155    pub const DEFAULT: Self = Self {
26156        first_sequence: 0_u16,
26157        last_sequence: 0_u16,
26158        target_system: 0_u8,
26159        target_component: 0_u8,
26160    };
26161    #[cfg(feature = "arbitrary")]
26162    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26163        use arbitrary::{Arbitrary, Unstructured};
26164        let mut buf = [0u8; 1024];
26165        rng.fill_bytes(&mut buf);
26166        let mut unstructured = Unstructured::new(&buf);
26167        Self::arbitrary(&mut unstructured).unwrap_or_default()
26168    }
26169}
26170impl Default for REQUEST_EVENT_DATA {
26171    fn default() -> Self {
26172        Self::DEFAULT.clone()
26173    }
26174}
26175impl MessageData for REQUEST_EVENT_DATA {
26176    type Message = MavMessage;
26177    const ID: u32 = 412u32;
26178    const NAME: &'static str = "REQUEST_EVENT";
26179    const EXTRA_CRC: u8 = 33u8;
26180    const ENCODED_LEN: usize = 6usize;
26181    fn deser(
26182        _version: MavlinkVersion,
26183        __input: &[u8],
26184    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26185        let avail_len = __input.len();
26186        let mut payload_buf = [0; Self::ENCODED_LEN];
26187        let mut buf = if avail_len < Self::ENCODED_LEN {
26188            payload_buf[0..avail_len].copy_from_slice(__input);
26189            Bytes::new(&payload_buf)
26190        } else {
26191            Bytes::new(__input)
26192        };
26193        let mut __struct = Self::default();
26194        __struct.first_sequence = buf.get_u16_le();
26195        __struct.last_sequence = buf.get_u16_le();
26196        __struct.target_system = buf.get_u8();
26197        __struct.target_component = buf.get_u8();
26198        Ok(__struct)
26199    }
26200    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26201        let mut __tmp = BytesMut::new(bytes);
26202        #[allow(clippy::absurd_extreme_comparisons)]
26203        #[allow(unused_comparisons)]
26204        if __tmp.remaining() < Self::ENCODED_LEN {
26205            panic!(
26206                "buffer is too small (need {} bytes, but got {})",
26207                Self::ENCODED_LEN,
26208                __tmp.remaining(),
26209            )
26210        }
26211        __tmp.put_u16_le(self.first_sequence);
26212        __tmp.put_u16_le(self.last_sequence);
26213        __tmp.put_u8(self.target_system);
26214        __tmp.put_u8(self.target_component);
26215        if matches!(version, MavlinkVersion::V2) {
26216            let len = __tmp.len();
26217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26218        } else {
26219            __tmp.len()
26220        }
26221    }
26222}
26223#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26224#[doc = ""]
26225#[doc = "ID: 142"]
26226#[derive(Debug, Clone, PartialEq)]
26227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26229#[cfg_attr(feature = "ts", derive(TS))]
26230#[cfg_attr(feature = "ts", ts(export))]
26231pub struct RESOURCE_REQUEST_DATA {
26232    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26233    pub request_id: u8,
26234    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26235    pub uri_type: u8,
26236    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26239    pub uri: [u8; 120],
26240    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26241    pub transfer_type: u8,
26242    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26243    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26244    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26245    pub storage: [u8; 120],
26246}
26247impl RESOURCE_REQUEST_DATA {
26248    pub const ENCODED_LEN: usize = 243usize;
26249    pub const DEFAULT: Self = Self {
26250        request_id: 0_u8,
26251        uri_type: 0_u8,
26252        uri: [0_u8; 120usize],
26253        transfer_type: 0_u8,
26254        storage: [0_u8; 120usize],
26255    };
26256    #[cfg(feature = "arbitrary")]
26257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26258        use arbitrary::{Arbitrary, Unstructured};
26259        let mut buf = [0u8; 1024];
26260        rng.fill_bytes(&mut buf);
26261        let mut unstructured = Unstructured::new(&buf);
26262        Self::arbitrary(&mut unstructured).unwrap_or_default()
26263    }
26264}
26265impl Default for RESOURCE_REQUEST_DATA {
26266    fn default() -> Self {
26267        Self::DEFAULT.clone()
26268    }
26269}
26270impl MessageData for RESOURCE_REQUEST_DATA {
26271    type Message = MavMessage;
26272    const ID: u32 = 142u32;
26273    const NAME: &'static str = "RESOURCE_REQUEST";
26274    const EXTRA_CRC: u8 = 72u8;
26275    const ENCODED_LEN: usize = 243usize;
26276    fn deser(
26277        _version: MavlinkVersion,
26278        __input: &[u8],
26279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26280        let avail_len = __input.len();
26281        let mut payload_buf = [0; Self::ENCODED_LEN];
26282        let mut buf = if avail_len < Self::ENCODED_LEN {
26283            payload_buf[0..avail_len].copy_from_slice(__input);
26284            Bytes::new(&payload_buf)
26285        } else {
26286            Bytes::new(__input)
26287        };
26288        let mut __struct = Self::default();
26289        __struct.request_id = buf.get_u8();
26290        __struct.uri_type = buf.get_u8();
26291        for v in &mut __struct.uri {
26292            let val = buf.get_u8();
26293            *v = val;
26294        }
26295        __struct.transfer_type = buf.get_u8();
26296        for v in &mut __struct.storage {
26297            let val = buf.get_u8();
26298            *v = val;
26299        }
26300        Ok(__struct)
26301    }
26302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26303        let mut __tmp = BytesMut::new(bytes);
26304        #[allow(clippy::absurd_extreme_comparisons)]
26305        #[allow(unused_comparisons)]
26306        if __tmp.remaining() < Self::ENCODED_LEN {
26307            panic!(
26308                "buffer is too small (need {} bytes, but got {})",
26309                Self::ENCODED_LEN,
26310                __tmp.remaining(),
26311            )
26312        }
26313        __tmp.put_u8(self.request_id);
26314        __tmp.put_u8(self.uri_type);
26315        for val in &self.uri {
26316            __tmp.put_u8(*val);
26317        }
26318        __tmp.put_u8(self.transfer_type);
26319        for val in &self.storage {
26320            __tmp.put_u8(*val);
26321        }
26322        if matches!(version, MavlinkVersion::V2) {
26323            let len = __tmp.len();
26324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26325        } else {
26326            __tmp.len()
26327        }
26328    }
26329}
26330#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26331#[doc = ""]
26332#[doc = "ID: 413"]
26333#[derive(Debug, Clone, PartialEq)]
26334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26336#[cfg_attr(feature = "ts", derive(TS))]
26337#[cfg_attr(feature = "ts", ts(export))]
26338pub struct RESPONSE_EVENT_ERROR_DATA {
26339    #[doc = "Sequence number."]
26340    pub sequence: u16,
26341    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26342    pub sequence_oldest_available: u16,
26343    #[doc = "System ID"]
26344    pub target_system: u8,
26345    #[doc = "Component ID"]
26346    pub target_component: u8,
26347    #[doc = "Error reason."]
26348    pub reason: MavEventErrorReason,
26349}
26350impl RESPONSE_EVENT_ERROR_DATA {
26351    pub const ENCODED_LEN: usize = 7usize;
26352    pub const DEFAULT: Self = Self {
26353        sequence: 0_u16,
26354        sequence_oldest_available: 0_u16,
26355        target_system: 0_u8,
26356        target_component: 0_u8,
26357        reason: MavEventErrorReason::DEFAULT,
26358    };
26359    #[cfg(feature = "arbitrary")]
26360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26361        use arbitrary::{Arbitrary, Unstructured};
26362        let mut buf = [0u8; 1024];
26363        rng.fill_bytes(&mut buf);
26364        let mut unstructured = Unstructured::new(&buf);
26365        Self::arbitrary(&mut unstructured).unwrap_or_default()
26366    }
26367}
26368impl Default for RESPONSE_EVENT_ERROR_DATA {
26369    fn default() -> Self {
26370        Self::DEFAULT.clone()
26371    }
26372}
26373impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26374    type Message = MavMessage;
26375    const ID: u32 = 413u32;
26376    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26377    const EXTRA_CRC: u8 = 77u8;
26378    const ENCODED_LEN: usize = 7usize;
26379    fn deser(
26380        _version: MavlinkVersion,
26381        __input: &[u8],
26382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26383        let avail_len = __input.len();
26384        let mut payload_buf = [0; Self::ENCODED_LEN];
26385        let mut buf = if avail_len < Self::ENCODED_LEN {
26386            payload_buf[0..avail_len].copy_from_slice(__input);
26387            Bytes::new(&payload_buf)
26388        } else {
26389            Bytes::new(__input)
26390        };
26391        let mut __struct = Self::default();
26392        __struct.sequence = buf.get_u16_le();
26393        __struct.sequence_oldest_available = buf.get_u16_le();
26394        __struct.target_system = buf.get_u8();
26395        __struct.target_component = buf.get_u8();
26396        let tmp = buf.get_u8();
26397        __struct.reason =
26398            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26399                enum_type: "MavEventErrorReason",
26400                value: tmp as u32,
26401            })?;
26402        Ok(__struct)
26403    }
26404    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26405        let mut __tmp = BytesMut::new(bytes);
26406        #[allow(clippy::absurd_extreme_comparisons)]
26407        #[allow(unused_comparisons)]
26408        if __tmp.remaining() < Self::ENCODED_LEN {
26409            panic!(
26410                "buffer is too small (need {} bytes, but got {})",
26411                Self::ENCODED_LEN,
26412                __tmp.remaining(),
26413            )
26414        }
26415        __tmp.put_u16_le(self.sequence);
26416        __tmp.put_u16_le(self.sequence_oldest_available);
26417        __tmp.put_u8(self.target_system);
26418        __tmp.put_u8(self.target_component);
26419        __tmp.put_u8(self.reason as u8);
26420        if matches!(version, MavlinkVersion::V2) {
26421            let len = __tmp.len();
26422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26423        } else {
26424            __tmp.len()
26425        }
26426    }
26427}
26428#[doc = "Read out the safety zone the MAV currently assumes."]
26429#[doc = ""]
26430#[doc = "ID: 55"]
26431#[derive(Debug, Clone, PartialEq)]
26432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26434#[cfg_attr(feature = "ts", derive(TS))]
26435#[cfg_attr(feature = "ts", ts(export))]
26436pub struct SAFETY_ALLOWED_AREA_DATA {
26437    #[doc = "x position 1 / Latitude 1"]
26438    pub p1x: f32,
26439    #[doc = "y position 1 / Longitude 1"]
26440    pub p1y: f32,
26441    #[doc = "z position 1 / Altitude 1"]
26442    pub p1z: f32,
26443    #[doc = "x position 2 / Latitude 2"]
26444    pub p2x: f32,
26445    #[doc = "y position 2 / Longitude 2"]
26446    pub p2y: f32,
26447    #[doc = "z position 2 / Altitude 2"]
26448    pub p2z: f32,
26449    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26450    pub frame: MavFrame,
26451}
26452impl SAFETY_ALLOWED_AREA_DATA {
26453    pub const ENCODED_LEN: usize = 25usize;
26454    pub const DEFAULT: Self = Self {
26455        p1x: 0.0_f32,
26456        p1y: 0.0_f32,
26457        p1z: 0.0_f32,
26458        p2x: 0.0_f32,
26459        p2y: 0.0_f32,
26460        p2z: 0.0_f32,
26461        frame: MavFrame::DEFAULT,
26462    };
26463    #[cfg(feature = "arbitrary")]
26464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26465        use arbitrary::{Arbitrary, Unstructured};
26466        let mut buf = [0u8; 1024];
26467        rng.fill_bytes(&mut buf);
26468        let mut unstructured = Unstructured::new(&buf);
26469        Self::arbitrary(&mut unstructured).unwrap_or_default()
26470    }
26471}
26472impl Default for SAFETY_ALLOWED_AREA_DATA {
26473    fn default() -> Self {
26474        Self::DEFAULT.clone()
26475    }
26476}
26477impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26478    type Message = MavMessage;
26479    const ID: u32 = 55u32;
26480    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26481    const EXTRA_CRC: u8 = 3u8;
26482    const ENCODED_LEN: usize = 25usize;
26483    fn deser(
26484        _version: MavlinkVersion,
26485        __input: &[u8],
26486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26487        let avail_len = __input.len();
26488        let mut payload_buf = [0; Self::ENCODED_LEN];
26489        let mut buf = if avail_len < Self::ENCODED_LEN {
26490            payload_buf[0..avail_len].copy_from_slice(__input);
26491            Bytes::new(&payload_buf)
26492        } else {
26493            Bytes::new(__input)
26494        };
26495        let mut __struct = Self::default();
26496        __struct.p1x = buf.get_f32_le();
26497        __struct.p1y = buf.get_f32_le();
26498        __struct.p1z = buf.get_f32_le();
26499        __struct.p2x = buf.get_f32_le();
26500        __struct.p2y = buf.get_f32_le();
26501        __struct.p2z = buf.get_f32_le();
26502        let tmp = buf.get_u8();
26503        __struct.frame =
26504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26505                enum_type: "MavFrame",
26506                value: tmp as u32,
26507            })?;
26508        Ok(__struct)
26509    }
26510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26511        let mut __tmp = BytesMut::new(bytes);
26512        #[allow(clippy::absurd_extreme_comparisons)]
26513        #[allow(unused_comparisons)]
26514        if __tmp.remaining() < Self::ENCODED_LEN {
26515            panic!(
26516                "buffer is too small (need {} bytes, but got {})",
26517                Self::ENCODED_LEN,
26518                __tmp.remaining(),
26519            )
26520        }
26521        __tmp.put_f32_le(self.p1x);
26522        __tmp.put_f32_le(self.p1y);
26523        __tmp.put_f32_le(self.p1z);
26524        __tmp.put_f32_le(self.p2x);
26525        __tmp.put_f32_le(self.p2y);
26526        __tmp.put_f32_le(self.p2z);
26527        __tmp.put_u8(self.frame as u8);
26528        if matches!(version, MavlinkVersion::V2) {
26529            let len = __tmp.len();
26530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26531        } else {
26532            __tmp.len()
26533        }
26534    }
26535}
26536#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26537#[doc = ""]
26538#[doc = "ID: 54"]
26539#[derive(Debug, Clone, PartialEq)]
26540#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26541#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26542#[cfg_attr(feature = "ts", derive(TS))]
26543#[cfg_attr(feature = "ts", ts(export))]
26544pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26545    #[doc = "x position 1 / Latitude 1"]
26546    pub p1x: f32,
26547    #[doc = "y position 1 / Longitude 1"]
26548    pub p1y: f32,
26549    #[doc = "z position 1 / Altitude 1"]
26550    pub p1z: f32,
26551    #[doc = "x position 2 / Latitude 2"]
26552    pub p2x: f32,
26553    #[doc = "y position 2 / Longitude 2"]
26554    pub p2y: f32,
26555    #[doc = "z position 2 / Altitude 2"]
26556    pub p2z: f32,
26557    #[doc = "System ID"]
26558    pub target_system: u8,
26559    #[doc = "Component ID"]
26560    pub target_component: u8,
26561    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26562    pub frame: MavFrame,
26563}
26564impl SAFETY_SET_ALLOWED_AREA_DATA {
26565    pub const ENCODED_LEN: usize = 27usize;
26566    pub const DEFAULT: Self = Self {
26567        p1x: 0.0_f32,
26568        p1y: 0.0_f32,
26569        p1z: 0.0_f32,
26570        p2x: 0.0_f32,
26571        p2y: 0.0_f32,
26572        p2z: 0.0_f32,
26573        target_system: 0_u8,
26574        target_component: 0_u8,
26575        frame: MavFrame::DEFAULT,
26576    };
26577    #[cfg(feature = "arbitrary")]
26578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26579        use arbitrary::{Arbitrary, Unstructured};
26580        let mut buf = [0u8; 1024];
26581        rng.fill_bytes(&mut buf);
26582        let mut unstructured = Unstructured::new(&buf);
26583        Self::arbitrary(&mut unstructured).unwrap_or_default()
26584    }
26585}
26586impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26587    fn default() -> Self {
26588        Self::DEFAULT.clone()
26589    }
26590}
26591impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26592    type Message = MavMessage;
26593    const ID: u32 = 54u32;
26594    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26595    const EXTRA_CRC: u8 = 15u8;
26596    const ENCODED_LEN: usize = 27usize;
26597    fn deser(
26598        _version: MavlinkVersion,
26599        __input: &[u8],
26600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26601        let avail_len = __input.len();
26602        let mut payload_buf = [0; Self::ENCODED_LEN];
26603        let mut buf = if avail_len < Self::ENCODED_LEN {
26604            payload_buf[0..avail_len].copy_from_slice(__input);
26605            Bytes::new(&payload_buf)
26606        } else {
26607            Bytes::new(__input)
26608        };
26609        let mut __struct = Self::default();
26610        __struct.p1x = buf.get_f32_le();
26611        __struct.p1y = buf.get_f32_le();
26612        __struct.p1z = buf.get_f32_le();
26613        __struct.p2x = buf.get_f32_le();
26614        __struct.p2y = buf.get_f32_le();
26615        __struct.p2z = buf.get_f32_le();
26616        __struct.target_system = buf.get_u8();
26617        __struct.target_component = buf.get_u8();
26618        let tmp = buf.get_u8();
26619        __struct.frame =
26620            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26621                enum_type: "MavFrame",
26622                value: tmp as u32,
26623            })?;
26624        Ok(__struct)
26625    }
26626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26627        let mut __tmp = BytesMut::new(bytes);
26628        #[allow(clippy::absurd_extreme_comparisons)]
26629        #[allow(unused_comparisons)]
26630        if __tmp.remaining() < Self::ENCODED_LEN {
26631            panic!(
26632                "buffer is too small (need {} bytes, but got {})",
26633                Self::ENCODED_LEN,
26634                __tmp.remaining(),
26635            )
26636        }
26637        __tmp.put_f32_le(self.p1x);
26638        __tmp.put_f32_le(self.p1y);
26639        __tmp.put_f32_le(self.p1z);
26640        __tmp.put_f32_le(self.p2x);
26641        __tmp.put_f32_le(self.p2y);
26642        __tmp.put_f32_le(self.p2z);
26643        __tmp.put_u8(self.target_system);
26644        __tmp.put_u8(self.target_component);
26645        __tmp.put_u8(self.frame as u8);
26646        if matches!(version, MavlinkVersion::V2) {
26647            let len = __tmp.len();
26648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26649        } else {
26650            __tmp.len()
26651        }
26652    }
26653}
26654#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26655#[doc = ""]
26656#[doc = "ID: 26"]
26657#[derive(Debug, Clone, PartialEq)]
26658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26660#[cfg_attr(feature = "ts", derive(TS))]
26661#[cfg_attr(feature = "ts", ts(export))]
26662pub struct SCALED_IMU_DATA {
26663    #[doc = "Timestamp (time since system boot)."]
26664    pub time_boot_ms: u32,
26665    #[doc = "X acceleration"]
26666    pub xacc: i16,
26667    #[doc = "Y acceleration"]
26668    pub yacc: i16,
26669    #[doc = "Z acceleration"]
26670    pub zacc: i16,
26671    #[doc = "Angular speed around X axis"]
26672    pub xgyro: i16,
26673    #[doc = "Angular speed around Y axis"]
26674    pub ygyro: i16,
26675    #[doc = "Angular speed around Z axis"]
26676    pub zgyro: i16,
26677    #[doc = "X Magnetic field"]
26678    pub xmag: i16,
26679    #[doc = "Y Magnetic field"]
26680    pub ymag: i16,
26681    #[doc = "Z Magnetic field"]
26682    pub zmag: i16,
26683    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26684    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26685    pub temperature: i16,
26686}
26687impl SCALED_IMU_DATA {
26688    pub const ENCODED_LEN: usize = 24usize;
26689    pub const DEFAULT: Self = Self {
26690        time_boot_ms: 0_u32,
26691        xacc: 0_i16,
26692        yacc: 0_i16,
26693        zacc: 0_i16,
26694        xgyro: 0_i16,
26695        ygyro: 0_i16,
26696        zgyro: 0_i16,
26697        xmag: 0_i16,
26698        ymag: 0_i16,
26699        zmag: 0_i16,
26700        temperature: 0_i16,
26701    };
26702    #[cfg(feature = "arbitrary")]
26703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26704        use arbitrary::{Arbitrary, Unstructured};
26705        let mut buf = [0u8; 1024];
26706        rng.fill_bytes(&mut buf);
26707        let mut unstructured = Unstructured::new(&buf);
26708        Self::arbitrary(&mut unstructured).unwrap_or_default()
26709    }
26710}
26711impl Default for SCALED_IMU_DATA {
26712    fn default() -> Self {
26713        Self::DEFAULT.clone()
26714    }
26715}
26716impl MessageData for SCALED_IMU_DATA {
26717    type Message = MavMessage;
26718    const ID: u32 = 26u32;
26719    const NAME: &'static str = "SCALED_IMU";
26720    const EXTRA_CRC: u8 = 170u8;
26721    const ENCODED_LEN: usize = 24usize;
26722    fn deser(
26723        _version: MavlinkVersion,
26724        __input: &[u8],
26725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26726        let avail_len = __input.len();
26727        let mut payload_buf = [0; Self::ENCODED_LEN];
26728        let mut buf = if avail_len < Self::ENCODED_LEN {
26729            payload_buf[0..avail_len].copy_from_slice(__input);
26730            Bytes::new(&payload_buf)
26731        } else {
26732            Bytes::new(__input)
26733        };
26734        let mut __struct = Self::default();
26735        __struct.time_boot_ms = buf.get_u32_le();
26736        __struct.xacc = buf.get_i16_le();
26737        __struct.yacc = buf.get_i16_le();
26738        __struct.zacc = buf.get_i16_le();
26739        __struct.xgyro = buf.get_i16_le();
26740        __struct.ygyro = buf.get_i16_le();
26741        __struct.zgyro = buf.get_i16_le();
26742        __struct.xmag = buf.get_i16_le();
26743        __struct.ymag = buf.get_i16_le();
26744        __struct.zmag = buf.get_i16_le();
26745        __struct.temperature = buf.get_i16_le();
26746        Ok(__struct)
26747    }
26748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26749        let mut __tmp = BytesMut::new(bytes);
26750        #[allow(clippy::absurd_extreme_comparisons)]
26751        #[allow(unused_comparisons)]
26752        if __tmp.remaining() < Self::ENCODED_LEN {
26753            panic!(
26754                "buffer is too small (need {} bytes, but got {})",
26755                Self::ENCODED_LEN,
26756                __tmp.remaining(),
26757            )
26758        }
26759        __tmp.put_u32_le(self.time_boot_ms);
26760        __tmp.put_i16_le(self.xacc);
26761        __tmp.put_i16_le(self.yacc);
26762        __tmp.put_i16_le(self.zacc);
26763        __tmp.put_i16_le(self.xgyro);
26764        __tmp.put_i16_le(self.ygyro);
26765        __tmp.put_i16_le(self.zgyro);
26766        __tmp.put_i16_le(self.xmag);
26767        __tmp.put_i16_le(self.ymag);
26768        __tmp.put_i16_le(self.zmag);
26769        if matches!(version, MavlinkVersion::V2) {
26770            __tmp.put_i16_le(self.temperature);
26771            let len = __tmp.len();
26772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26773        } else {
26774            __tmp.len()
26775        }
26776    }
26777}
26778#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26779#[doc = ""]
26780#[doc = "ID: 116"]
26781#[derive(Debug, Clone, PartialEq)]
26782#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26784#[cfg_attr(feature = "ts", derive(TS))]
26785#[cfg_attr(feature = "ts", ts(export))]
26786pub struct SCALED_IMU2_DATA {
26787    #[doc = "Timestamp (time since system boot)."]
26788    pub time_boot_ms: u32,
26789    #[doc = "X acceleration"]
26790    pub xacc: i16,
26791    #[doc = "Y acceleration"]
26792    pub yacc: i16,
26793    #[doc = "Z acceleration"]
26794    pub zacc: i16,
26795    #[doc = "Angular speed around X axis"]
26796    pub xgyro: i16,
26797    #[doc = "Angular speed around Y axis"]
26798    pub ygyro: i16,
26799    #[doc = "Angular speed around Z axis"]
26800    pub zgyro: i16,
26801    #[doc = "X Magnetic field"]
26802    pub xmag: i16,
26803    #[doc = "Y Magnetic field"]
26804    pub ymag: i16,
26805    #[doc = "Z Magnetic field"]
26806    pub zmag: i16,
26807    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26809    pub temperature: i16,
26810}
26811impl SCALED_IMU2_DATA {
26812    pub const ENCODED_LEN: usize = 24usize;
26813    pub const DEFAULT: Self = Self {
26814        time_boot_ms: 0_u32,
26815        xacc: 0_i16,
26816        yacc: 0_i16,
26817        zacc: 0_i16,
26818        xgyro: 0_i16,
26819        ygyro: 0_i16,
26820        zgyro: 0_i16,
26821        xmag: 0_i16,
26822        ymag: 0_i16,
26823        zmag: 0_i16,
26824        temperature: 0_i16,
26825    };
26826    #[cfg(feature = "arbitrary")]
26827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26828        use arbitrary::{Arbitrary, Unstructured};
26829        let mut buf = [0u8; 1024];
26830        rng.fill_bytes(&mut buf);
26831        let mut unstructured = Unstructured::new(&buf);
26832        Self::arbitrary(&mut unstructured).unwrap_or_default()
26833    }
26834}
26835impl Default for SCALED_IMU2_DATA {
26836    fn default() -> Self {
26837        Self::DEFAULT.clone()
26838    }
26839}
26840impl MessageData for SCALED_IMU2_DATA {
26841    type Message = MavMessage;
26842    const ID: u32 = 116u32;
26843    const NAME: &'static str = "SCALED_IMU2";
26844    const EXTRA_CRC: u8 = 76u8;
26845    const ENCODED_LEN: usize = 24usize;
26846    fn deser(
26847        _version: MavlinkVersion,
26848        __input: &[u8],
26849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26850        let avail_len = __input.len();
26851        let mut payload_buf = [0; Self::ENCODED_LEN];
26852        let mut buf = if avail_len < Self::ENCODED_LEN {
26853            payload_buf[0..avail_len].copy_from_slice(__input);
26854            Bytes::new(&payload_buf)
26855        } else {
26856            Bytes::new(__input)
26857        };
26858        let mut __struct = Self::default();
26859        __struct.time_boot_ms = buf.get_u32_le();
26860        __struct.xacc = buf.get_i16_le();
26861        __struct.yacc = buf.get_i16_le();
26862        __struct.zacc = buf.get_i16_le();
26863        __struct.xgyro = buf.get_i16_le();
26864        __struct.ygyro = buf.get_i16_le();
26865        __struct.zgyro = buf.get_i16_le();
26866        __struct.xmag = buf.get_i16_le();
26867        __struct.ymag = buf.get_i16_le();
26868        __struct.zmag = buf.get_i16_le();
26869        __struct.temperature = buf.get_i16_le();
26870        Ok(__struct)
26871    }
26872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26873        let mut __tmp = BytesMut::new(bytes);
26874        #[allow(clippy::absurd_extreme_comparisons)]
26875        #[allow(unused_comparisons)]
26876        if __tmp.remaining() < Self::ENCODED_LEN {
26877            panic!(
26878                "buffer is too small (need {} bytes, but got {})",
26879                Self::ENCODED_LEN,
26880                __tmp.remaining(),
26881            )
26882        }
26883        __tmp.put_u32_le(self.time_boot_ms);
26884        __tmp.put_i16_le(self.xacc);
26885        __tmp.put_i16_le(self.yacc);
26886        __tmp.put_i16_le(self.zacc);
26887        __tmp.put_i16_le(self.xgyro);
26888        __tmp.put_i16_le(self.ygyro);
26889        __tmp.put_i16_le(self.zgyro);
26890        __tmp.put_i16_le(self.xmag);
26891        __tmp.put_i16_le(self.ymag);
26892        __tmp.put_i16_le(self.zmag);
26893        if matches!(version, MavlinkVersion::V2) {
26894            __tmp.put_i16_le(self.temperature);
26895            let len = __tmp.len();
26896            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26897        } else {
26898            __tmp.len()
26899        }
26900    }
26901}
26902#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26903#[doc = ""]
26904#[doc = "ID: 129"]
26905#[derive(Debug, Clone, PartialEq)]
26906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26908#[cfg_attr(feature = "ts", derive(TS))]
26909#[cfg_attr(feature = "ts", ts(export))]
26910pub struct SCALED_IMU3_DATA {
26911    #[doc = "Timestamp (time since system boot)."]
26912    pub time_boot_ms: u32,
26913    #[doc = "X acceleration"]
26914    pub xacc: i16,
26915    #[doc = "Y acceleration"]
26916    pub yacc: i16,
26917    #[doc = "Z acceleration"]
26918    pub zacc: i16,
26919    #[doc = "Angular speed around X axis"]
26920    pub xgyro: i16,
26921    #[doc = "Angular speed around Y axis"]
26922    pub ygyro: i16,
26923    #[doc = "Angular speed around Z axis"]
26924    pub zgyro: i16,
26925    #[doc = "X Magnetic field"]
26926    pub xmag: i16,
26927    #[doc = "Y Magnetic field"]
26928    pub ymag: i16,
26929    #[doc = "Z Magnetic field"]
26930    pub zmag: i16,
26931    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26933    pub temperature: i16,
26934}
26935impl SCALED_IMU3_DATA {
26936    pub const ENCODED_LEN: usize = 24usize;
26937    pub const DEFAULT: Self = Self {
26938        time_boot_ms: 0_u32,
26939        xacc: 0_i16,
26940        yacc: 0_i16,
26941        zacc: 0_i16,
26942        xgyro: 0_i16,
26943        ygyro: 0_i16,
26944        zgyro: 0_i16,
26945        xmag: 0_i16,
26946        ymag: 0_i16,
26947        zmag: 0_i16,
26948        temperature: 0_i16,
26949    };
26950    #[cfg(feature = "arbitrary")]
26951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26952        use arbitrary::{Arbitrary, Unstructured};
26953        let mut buf = [0u8; 1024];
26954        rng.fill_bytes(&mut buf);
26955        let mut unstructured = Unstructured::new(&buf);
26956        Self::arbitrary(&mut unstructured).unwrap_or_default()
26957    }
26958}
26959impl Default for SCALED_IMU3_DATA {
26960    fn default() -> Self {
26961        Self::DEFAULT.clone()
26962    }
26963}
26964impl MessageData for SCALED_IMU3_DATA {
26965    type Message = MavMessage;
26966    const ID: u32 = 129u32;
26967    const NAME: &'static str = "SCALED_IMU3";
26968    const EXTRA_CRC: u8 = 46u8;
26969    const ENCODED_LEN: usize = 24usize;
26970    fn deser(
26971        _version: MavlinkVersion,
26972        __input: &[u8],
26973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26974        let avail_len = __input.len();
26975        let mut payload_buf = [0; Self::ENCODED_LEN];
26976        let mut buf = if avail_len < Self::ENCODED_LEN {
26977            payload_buf[0..avail_len].copy_from_slice(__input);
26978            Bytes::new(&payload_buf)
26979        } else {
26980            Bytes::new(__input)
26981        };
26982        let mut __struct = Self::default();
26983        __struct.time_boot_ms = buf.get_u32_le();
26984        __struct.xacc = buf.get_i16_le();
26985        __struct.yacc = buf.get_i16_le();
26986        __struct.zacc = buf.get_i16_le();
26987        __struct.xgyro = buf.get_i16_le();
26988        __struct.ygyro = buf.get_i16_le();
26989        __struct.zgyro = buf.get_i16_le();
26990        __struct.xmag = buf.get_i16_le();
26991        __struct.ymag = buf.get_i16_le();
26992        __struct.zmag = buf.get_i16_le();
26993        __struct.temperature = buf.get_i16_le();
26994        Ok(__struct)
26995    }
26996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26997        let mut __tmp = BytesMut::new(bytes);
26998        #[allow(clippy::absurd_extreme_comparisons)]
26999        #[allow(unused_comparisons)]
27000        if __tmp.remaining() < Self::ENCODED_LEN {
27001            panic!(
27002                "buffer is too small (need {} bytes, but got {})",
27003                Self::ENCODED_LEN,
27004                __tmp.remaining(),
27005            )
27006        }
27007        __tmp.put_u32_le(self.time_boot_ms);
27008        __tmp.put_i16_le(self.xacc);
27009        __tmp.put_i16_le(self.yacc);
27010        __tmp.put_i16_le(self.zacc);
27011        __tmp.put_i16_le(self.xgyro);
27012        __tmp.put_i16_le(self.ygyro);
27013        __tmp.put_i16_le(self.zgyro);
27014        __tmp.put_i16_le(self.xmag);
27015        __tmp.put_i16_le(self.ymag);
27016        __tmp.put_i16_le(self.zmag);
27017        if matches!(version, MavlinkVersion::V2) {
27018            __tmp.put_i16_le(self.temperature);
27019            let len = __tmp.len();
27020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27021        } else {
27022            __tmp.len()
27023        }
27024    }
27025}
27026#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27027#[doc = ""]
27028#[doc = "ID: 29"]
27029#[derive(Debug, Clone, PartialEq)]
27030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27032#[cfg_attr(feature = "ts", derive(TS))]
27033#[cfg_attr(feature = "ts", ts(export))]
27034pub struct SCALED_PRESSURE_DATA {
27035    #[doc = "Timestamp (time since system boot)."]
27036    pub time_boot_ms: u32,
27037    #[doc = "Absolute pressure"]
27038    pub press_abs: f32,
27039    #[doc = "Differential pressure 1"]
27040    pub press_diff: f32,
27041    #[doc = "Absolute pressure temperature"]
27042    pub temperature: i16,
27043    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27044    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27045    pub temperature_press_diff: i16,
27046}
27047impl SCALED_PRESSURE_DATA {
27048    pub const ENCODED_LEN: usize = 16usize;
27049    pub const DEFAULT: Self = Self {
27050        time_boot_ms: 0_u32,
27051        press_abs: 0.0_f32,
27052        press_diff: 0.0_f32,
27053        temperature: 0_i16,
27054        temperature_press_diff: 0_i16,
27055    };
27056    #[cfg(feature = "arbitrary")]
27057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27058        use arbitrary::{Arbitrary, Unstructured};
27059        let mut buf = [0u8; 1024];
27060        rng.fill_bytes(&mut buf);
27061        let mut unstructured = Unstructured::new(&buf);
27062        Self::arbitrary(&mut unstructured).unwrap_or_default()
27063    }
27064}
27065impl Default for SCALED_PRESSURE_DATA {
27066    fn default() -> Self {
27067        Self::DEFAULT.clone()
27068    }
27069}
27070impl MessageData for SCALED_PRESSURE_DATA {
27071    type Message = MavMessage;
27072    const ID: u32 = 29u32;
27073    const NAME: &'static str = "SCALED_PRESSURE";
27074    const EXTRA_CRC: u8 = 115u8;
27075    const ENCODED_LEN: usize = 16usize;
27076    fn deser(
27077        _version: MavlinkVersion,
27078        __input: &[u8],
27079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27080        let avail_len = __input.len();
27081        let mut payload_buf = [0; Self::ENCODED_LEN];
27082        let mut buf = if avail_len < Self::ENCODED_LEN {
27083            payload_buf[0..avail_len].copy_from_slice(__input);
27084            Bytes::new(&payload_buf)
27085        } else {
27086            Bytes::new(__input)
27087        };
27088        let mut __struct = Self::default();
27089        __struct.time_boot_ms = buf.get_u32_le();
27090        __struct.press_abs = buf.get_f32_le();
27091        __struct.press_diff = buf.get_f32_le();
27092        __struct.temperature = buf.get_i16_le();
27093        __struct.temperature_press_diff = buf.get_i16_le();
27094        Ok(__struct)
27095    }
27096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27097        let mut __tmp = BytesMut::new(bytes);
27098        #[allow(clippy::absurd_extreme_comparisons)]
27099        #[allow(unused_comparisons)]
27100        if __tmp.remaining() < Self::ENCODED_LEN {
27101            panic!(
27102                "buffer is too small (need {} bytes, but got {})",
27103                Self::ENCODED_LEN,
27104                __tmp.remaining(),
27105            )
27106        }
27107        __tmp.put_u32_le(self.time_boot_ms);
27108        __tmp.put_f32_le(self.press_abs);
27109        __tmp.put_f32_le(self.press_diff);
27110        __tmp.put_i16_le(self.temperature);
27111        if matches!(version, MavlinkVersion::V2) {
27112            __tmp.put_i16_le(self.temperature_press_diff);
27113            let len = __tmp.len();
27114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27115        } else {
27116            __tmp.len()
27117        }
27118    }
27119}
27120#[doc = "Barometer readings for 2nd barometer."]
27121#[doc = ""]
27122#[doc = "ID: 137"]
27123#[derive(Debug, Clone, PartialEq)]
27124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27126#[cfg_attr(feature = "ts", derive(TS))]
27127#[cfg_attr(feature = "ts", ts(export))]
27128pub struct SCALED_PRESSURE2_DATA {
27129    #[doc = "Timestamp (time since system boot)."]
27130    pub time_boot_ms: u32,
27131    #[doc = "Absolute pressure"]
27132    pub press_abs: f32,
27133    #[doc = "Differential pressure"]
27134    pub press_diff: f32,
27135    #[doc = "Absolute pressure temperature"]
27136    pub temperature: i16,
27137    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27138    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27139    pub temperature_press_diff: i16,
27140}
27141impl SCALED_PRESSURE2_DATA {
27142    pub const ENCODED_LEN: usize = 16usize;
27143    pub const DEFAULT: Self = Self {
27144        time_boot_ms: 0_u32,
27145        press_abs: 0.0_f32,
27146        press_diff: 0.0_f32,
27147        temperature: 0_i16,
27148        temperature_press_diff: 0_i16,
27149    };
27150    #[cfg(feature = "arbitrary")]
27151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27152        use arbitrary::{Arbitrary, Unstructured};
27153        let mut buf = [0u8; 1024];
27154        rng.fill_bytes(&mut buf);
27155        let mut unstructured = Unstructured::new(&buf);
27156        Self::arbitrary(&mut unstructured).unwrap_or_default()
27157    }
27158}
27159impl Default for SCALED_PRESSURE2_DATA {
27160    fn default() -> Self {
27161        Self::DEFAULT.clone()
27162    }
27163}
27164impl MessageData for SCALED_PRESSURE2_DATA {
27165    type Message = MavMessage;
27166    const ID: u32 = 137u32;
27167    const NAME: &'static str = "SCALED_PRESSURE2";
27168    const EXTRA_CRC: u8 = 195u8;
27169    const ENCODED_LEN: usize = 16usize;
27170    fn deser(
27171        _version: MavlinkVersion,
27172        __input: &[u8],
27173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27174        let avail_len = __input.len();
27175        let mut payload_buf = [0; Self::ENCODED_LEN];
27176        let mut buf = if avail_len < Self::ENCODED_LEN {
27177            payload_buf[0..avail_len].copy_from_slice(__input);
27178            Bytes::new(&payload_buf)
27179        } else {
27180            Bytes::new(__input)
27181        };
27182        let mut __struct = Self::default();
27183        __struct.time_boot_ms = buf.get_u32_le();
27184        __struct.press_abs = buf.get_f32_le();
27185        __struct.press_diff = buf.get_f32_le();
27186        __struct.temperature = buf.get_i16_le();
27187        __struct.temperature_press_diff = buf.get_i16_le();
27188        Ok(__struct)
27189    }
27190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27191        let mut __tmp = BytesMut::new(bytes);
27192        #[allow(clippy::absurd_extreme_comparisons)]
27193        #[allow(unused_comparisons)]
27194        if __tmp.remaining() < Self::ENCODED_LEN {
27195            panic!(
27196                "buffer is too small (need {} bytes, but got {})",
27197                Self::ENCODED_LEN,
27198                __tmp.remaining(),
27199            )
27200        }
27201        __tmp.put_u32_le(self.time_boot_ms);
27202        __tmp.put_f32_le(self.press_abs);
27203        __tmp.put_f32_le(self.press_diff);
27204        __tmp.put_i16_le(self.temperature);
27205        if matches!(version, MavlinkVersion::V2) {
27206            __tmp.put_i16_le(self.temperature_press_diff);
27207            let len = __tmp.len();
27208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27209        } else {
27210            __tmp.len()
27211        }
27212    }
27213}
27214#[doc = "Barometer readings for 3rd barometer."]
27215#[doc = ""]
27216#[doc = "ID: 143"]
27217#[derive(Debug, Clone, PartialEq)]
27218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27220#[cfg_attr(feature = "ts", derive(TS))]
27221#[cfg_attr(feature = "ts", ts(export))]
27222pub struct SCALED_PRESSURE3_DATA {
27223    #[doc = "Timestamp (time since system boot)."]
27224    pub time_boot_ms: u32,
27225    #[doc = "Absolute pressure"]
27226    pub press_abs: f32,
27227    #[doc = "Differential pressure"]
27228    pub press_diff: f32,
27229    #[doc = "Absolute pressure temperature"]
27230    pub temperature: i16,
27231    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27233    pub temperature_press_diff: i16,
27234}
27235impl SCALED_PRESSURE3_DATA {
27236    pub const ENCODED_LEN: usize = 16usize;
27237    pub const DEFAULT: Self = Self {
27238        time_boot_ms: 0_u32,
27239        press_abs: 0.0_f32,
27240        press_diff: 0.0_f32,
27241        temperature: 0_i16,
27242        temperature_press_diff: 0_i16,
27243    };
27244    #[cfg(feature = "arbitrary")]
27245    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27246        use arbitrary::{Arbitrary, Unstructured};
27247        let mut buf = [0u8; 1024];
27248        rng.fill_bytes(&mut buf);
27249        let mut unstructured = Unstructured::new(&buf);
27250        Self::arbitrary(&mut unstructured).unwrap_or_default()
27251    }
27252}
27253impl Default for SCALED_PRESSURE3_DATA {
27254    fn default() -> Self {
27255        Self::DEFAULT.clone()
27256    }
27257}
27258impl MessageData for SCALED_PRESSURE3_DATA {
27259    type Message = MavMessage;
27260    const ID: u32 = 143u32;
27261    const NAME: &'static str = "SCALED_PRESSURE3";
27262    const EXTRA_CRC: u8 = 131u8;
27263    const ENCODED_LEN: usize = 16usize;
27264    fn deser(
27265        _version: MavlinkVersion,
27266        __input: &[u8],
27267    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27268        let avail_len = __input.len();
27269        let mut payload_buf = [0; Self::ENCODED_LEN];
27270        let mut buf = if avail_len < Self::ENCODED_LEN {
27271            payload_buf[0..avail_len].copy_from_slice(__input);
27272            Bytes::new(&payload_buf)
27273        } else {
27274            Bytes::new(__input)
27275        };
27276        let mut __struct = Self::default();
27277        __struct.time_boot_ms = buf.get_u32_le();
27278        __struct.press_abs = buf.get_f32_le();
27279        __struct.press_diff = buf.get_f32_le();
27280        __struct.temperature = buf.get_i16_le();
27281        __struct.temperature_press_diff = buf.get_i16_le();
27282        Ok(__struct)
27283    }
27284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27285        let mut __tmp = BytesMut::new(bytes);
27286        #[allow(clippy::absurd_extreme_comparisons)]
27287        #[allow(unused_comparisons)]
27288        if __tmp.remaining() < Self::ENCODED_LEN {
27289            panic!(
27290                "buffer is too small (need {} bytes, but got {})",
27291                Self::ENCODED_LEN,
27292                __tmp.remaining(),
27293            )
27294        }
27295        __tmp.put_u32_le(self.time_boot_ms);
27296        __tmp.put_f32_le(self.press_abs);
27297        __tmp.put_f32_le(self.press_diff);
27298        __tmp.put_i16_le(self.temperature);
27299        if matches!(version, MavlinkVersion::V2) {
27300            __tmp.put_i16_le(self.temperature_press_diff);
27301            let len = __tmp.len();
27302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27303        } else {
27304            __tmp.len()
27305        }
27306    }
27307}
27308#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27309#[doc = ""]
27310#[doc = "ID: 126"]
27311#[derive(Debug, Clone, PartialEq)]
27312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27314#[cfg_attr(feature = "ts", derive(TS))]
27315#[cfg_attr(feature = "ts", ts(export))]
27316pub struct SERIAL_CONTROL_DATA {
27317    #[doc = "Baudrate of transfer. Zero means no change."]
27318    pub baudrate: u32,
27319    #[doc = "Timeout for reply data"]
27320    pub timeout: u16,
27321    #[doc = "Serial control device type."]
27322    pub device: SerialControlDev,
27323    #[doc = "Bitmap of serial control flags."]
27324    pub flags: SerialControlFlag,
27325    #[doc = "how many bytes in this transfer"]
27326    pub count: u8,
27327    #[doc = "serial data"]
27328    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27329    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27330    pub data: [u8; 70],
27331    #[doc = "System ID"]
27332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27333    pub target_system: u8,
27334    #[doc = "Component ID"]
27335    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27336    pub target_component: u8,
27337}
27338impl SERIAL_CONTROL_DATA {
27339    pub const ENCODED_LEN: usize = 81usize;
27340    pub const DEFAULT: Self = Self {
27341        baudrate: 0_u32,
27342        timeout: 0_u16,
27343        device: SerialControlDev::DEFAULT,
27344        flags: SerialControlFlag::DEFAULT,
27345        count: 0_u8,
27346        data: [0_u8; 70usize],
27347        target_system: 0_u8,
27348        target_component: 0_u8,
27349    };
27350    #[cfg(feature = "arbitrary")]
27351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27352        use arbitrary::{Arbitrary, Unstructured};
27353        let mut buf = [0u8; 1024];
27354        rng.fill_bytes(&mut buf);
27355        let mut unstructured = Unstructured::new(&buf);
27356        Self::arbitrary(&mut unstructured).unwrap_or_default()
27357    }
27358}
27359impl Default for SERIAL_CONTROL_DATA {
27360    fn default() -> Self {
27361        Self::DEFAULT.clone()
27362    }
27363}
27364impl MessageData for SERIAL_CONTROL_DATA {
27365    type Message = MavMessage;
27366    const ID: u32 = 126u32;
27367    const NAME: &'static str = "SERIAL_CONTROL";
27368    const EXTRA_CRC: u8 = 220u8;
27369    const ENCODED_LEN: usize = 81usize;
27370    fn deser(
27371        _version: MavlinkVersion,
27372        __input: &[u8],
27373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27374        let avail_len = __input.len();
27375        let mut payload_buf = [0; Self::ENCODED_LEN];
27376        let mut buf = if avail_len < Self::ENCODED_LEN {
27377            payload_buf[0..avail_len].copy_from_slice(__input);
27378            Bytes::new(&payload_buf)
27379        } else {
27380            Bytes::new(__input)
27381        };
27382        let mut __struct = Self::default();
27383        __struct.baudrate = buf.get_u32_le();
27384        __struct.timeout = buf.get_u16_le();
27385        let tmp = buf.get_u8();
27386        __struct.device =
27387            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27388                enum_type: "SerialControlDev",
27389                value: tmp as u32,
27390            })?;
27391        let tmp = buf.get_u8();
27392        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27393            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27394                flag_type: "SerialControlFlag",
27395                value: tmp as u32,
27396            })?;
27397        __struct.count = buf.get_u8();
27398        for v in &mut __struct.data {
27399            let val = buf.get_u8();
27400            *v = val;
27401        }
27402        __struct.target_system = buf.get_u8();
27403        __struct.target_component = buf.get_u8();
27404        Ok(__struct)
27405    }
27406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27407        let mut __tmp = BytesMut::new(bytes);
27408        #[allow(clippy::absurd_extreme_comparisons)]
27409        #[allow(unused_comparisons)]
27410        if __tmp.remaining() < Self::ENCODED_LEN {
27411            panic!(
27412                "buffer is too small (need {} bytes, but got {})",
27413                Self::ENCODED_LEN,
27414                __tmp.remaining(),
27415            )
27416        }
27417        __tmp.put_u32_le(self.baudrate);
27418        __tmp.put_u16_le(self.timeout);
27419        __tmp.put_u8(self.device as u8);
27420        __tmp.put_u8(self.flags.bits());
27421        __tmp.put_u8(self.count);
27422        for val in &self.data {
27423            __tmp.put_u8(*val);
27424        }
27425        if matches!(version, MavlinkVersion::V2) {
27426            __tmp.put_u8(self.target_system);
27427            __tmp.put_u8(self.target_component);
27428            let len = __tmp.len();
27429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27430        } else {
27431            __tmp.len()
27432        }
27433    }
27434}
27435#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27436#[doc = ""]
27437#[doc = "ID: 36"]
27438#[derive(Debug, Clone, PartialEq)]
27439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27441#[cfg_attr(feature = "ts", derive(TS))]
27442#[cfg_attr(feature = "ts", ts(export))]
27443pub struct SERVO_OUTPUT_RAW_DATA {
27444    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27445    pub time_usec: u32,
27446    #[doc = "Servo output 1 value"]
27447    pub servo1_raw: u16,
27448    #[doc = "Servo output 2 value"]
27449    pub servo2_raw: u16,
27450    #[doc = "Servo output 3 value"]
27451    pub servo3_raw: u16,
27452    #[doc = "Servo output 4 value"]
27453    pub servo4_raw: u16,
27454    #[doc = "Servo output 5 value"]
27455    pub servo5_raw: u16,
27456    #[doc = "Servo output 6 value"]
27457    pub servo6_raw: u16,
27458    #[doc = "Servo output 7 value"]
27459    pub servo7_raw: u16,
27460    #[doc = "Servo output 8 value"]
27461    pub servo8_raw: u16,
27462    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27463    pub port: u8,
27464    #[doc = "Servo output 9 value"]
27465    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27466    pub servo9_raw: u16,
27467    #[doc = "Servo output 10 value"]
27468    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27469    pub servo10_raw: u16,
27470    #[doc = "Servo output 11 value"]
27471    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27472    pub servo11_raw: u16,
27473    #[doc = "Servo output 12 value"]
27474    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27475    pub servo12_raw: u16,
27476    #[doc = "Servo output 13 value"]
27477    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27478    pub servo13_raw: u16,
27479    #[doc = "Servo output 14 value"]
27480    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27481    pub servo14_raw: u16,
27482    #[doc = "Servo output 15 value"]
27483    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27484    pub servo15_raw: u16,
27485    #[doc = "Servo output 16 value"]
27486    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27487    pub servo16_raw: u16,
27488}
27489impl SERVO_OUTPUT_RAW_DATA {
27490    pub const ENCODED_LEN: usize = 37usize;
27491    pub const DEFAULT: Self = Self {
27492        time_usec: 0_u32,
27493        servo1_raw: 0_u16,
27494        servo2_raw: 0_u16,
27495        servo3_raw: 0_u16,
27496        servo4_raw: 0_u16,
27497        servo5_raw: 0_u16,
27498        servo6_raw: 0_u16,
27499        servo7_raw: 0_u16,
27500        servo8_raw: 0_u16,
27501        port: 0_u8,
27502        servo9_raw: 0_u16,
27503        servo10_raw: 0_u16,
27504        servo11_raw: 0_u16,
27505        servo12_raw: 0_u16,
27506        servo13_raw: 0_u16,
27507        servo14_raw: 0_u16,
27508        servo15_raw: 0_u16,
27509        servo16_raw: 0_u16,
27510    };
27511    #[cfg(feature = "arbitrary")]
27512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27513        use arbitrary::{Arbitrary, Unstructured};
27514        let mut buf = [0u8; 1024];
27515        rng.fill_bytes(&mut buf);
27516        let mut unstructured = Unstructured::new(&buf);
27517        Self::arbitrary(&mut unstructured).unwrap_or_default()
27518    }
27519}
27520impl Default for SERVO_OUTPUT_RAW_DATA {
27521    fn default() -> Self {
27522        Self::DEFAULT.clone()
27523    }
27524}
27525impl MessageData for SERVO_OUTPUT_RAW_DATA {
27526    type Message = MavMessage;
27527    const ID: u32 = 36u32;
27528    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27529    const EXTRA_CRC: u8 = 222u8;
27530    const ENCODED_LEN: usize = 37usize;
27531    fn deser(
27532        _version: MavlinkVersion,
27533        __input: &[u8],
27534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27535        let avail_len = __input.len();
27536        let mut payload_buf = [0; Self::ENCODED_LEN];
27537        let mut buf = if avail_len < Self::ENCODED_LEN {
27538            payload_buf[0..avail_len].copy_from_slice(__input);
27539            Bytes::new(&payload_buf)
27540        } else {
27541            Bytes::new(__input)
27542        };
27543        let mut __struct = Self::default();
27544        __struct.time_usec = buf.get_u32_le();
27545        __struct.servo1_raw = buf.get_u16_le();
27546        __struct.servo2_raw = buf.get_u16_le();
27547        __struct.servo3_raw = buf.get_u16_le();
27548        __struct.servo4_raw = buf.get_u16_le();
27549        __struct.servo5_raw = buf.get_u16_le();
27550        __struct.servo6_raw = buf.get_u16_le();
27551        __struct.servo7_raw = buf.get_u16_le();
27552        __struct.servo8_raw = buf.get_u16_le();
27553        __struct.port = buf.get_u8();
27554        __struct.servo9_raw = buf.get_u16_le();
27555        __struct.servo10_raw = buf.get_u16_le();
27556        __struct.servo11_raw = buf.get_u16_le();
27557        __struct.servo12_raw = buf.get_u16_le();
27558        __struct.servo13_raw = buf.get_u16_le();
27559        __struct.servo14_raw = buf.get_u16_le();
27560        __struct.servo15_raw = buf.get_u16_le();
27561        __struct.servo16_raw = buf.get_u16_le();
27562        Ok(__struct)
27563    }
27564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27565        let mut __tmp = BytesMut::new(bytes);
27566        #[allow(clippy::absurd_extreme_comparisons)]
27567        #[allow(unused_comparisons)]
27568        if __tmp.remaining() < Self::ENCODED_LEN {
27569            panic!(
27570                "buffer is too small (need {} bytes, but got {})",
27571                Self::ENCODED_LEN,
27572                __tmp.remaining(),
27573            )
27574        }
27575        __tmp.put_u32_le(self.time_usec);
27576        __tmp.put_u16_le(self.servo1_raw);
27577        __tmp.put_u16_le(self.servo2_raw);
27578        __tmp.put_u16_le(self.servo3_raw);
27579        __tmp.put_u16_le(self.servo4_raw);
27580        __tmp.put_u16_le(self.servo5_raw);
27581        __tmp.put_u16_le(self.servo6_raw);
27582        __tmp.put_u16_le(self.servo7_raw);
27583        __tmp.put_u16_le(self.servo8_raw);
27584        __tmp.put_u8(self.port);
27585        if matches!(version, MavlinkVersion::V2) {
27586            __tmp.put_u16_le(self.servo9_raw);
27587            __tmp.put_u16_le(self.servo10_raw);
27588            __tmp.put_u16_le(self.servo11_raw);
27589            __tmp.put_u16_le(self.servo12_raw);
27590            __tmp.put_u16_le(self.servo13_raw);
27591            __tmp.put_u16_le(self.servo14_raw);
27592            __tmp.put_u16_le(self.servo15_raw);
27593            __tmp.put_u16_le(self.servo16_raw);
27594            let len = __tmp.len();
27595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27596        } else {
27597            __tmp.len()
27598        }
27599    }
27600}
27601#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27602#[doc = ""]
27603#[doc = "ID: 256"]
27604#[derive(Debug, Clone, PartialEq)]
27605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27607#[cfg_attr(feature = "ts", derive(TS))]
27608#[cfg_attr(feature = "ts", ts(export))]
27609pub struct SETUP_SIGNING_DATA {
27610    #[doc = "initial timestamp"]
27611    pub initial_timestamp: u64,
27612    #[doc = "system id of the target"]
27613    pub target_system: u8,
27614    #[doc = "component ID of the target"]
27615    pub target_component: u8,
27616    #[doc = "signing key"]
27617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27619    pub secret_key: [u8; 32],
27620}
27621impl SETUP_SIGNING_DATA {
27622    pub const ENCODED_LEN: usize = 42usize;
27623    pub const DEFAULT: Self = Self {
27624        initial_timestamp: 0_u64,
27625        target_system: 0_u8,
27626        target_component: 0_u8,
27627        secret_key: [0_u8; 32usize],
27628    };
27629    #[cfg(feature = "arbitrary")]
27630    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27631        use arbitrary::{Arbitrary, Unstructured};
27632        let mut buf = [0u8; 1024];
27633        rng.fill_bytes(&mut buf);
27634        let mut unstructured = Unstructured::new(&buf);
27635        Self::arbitrary(&mut unstructured).unwrap_or_default()
27636    }
27637}
27638impl Default for SETUP_SIGNING_DATA {
27639    fn default() -> Self {
27640        Self::DEFAULT.clone()
27641    }
27642}
27643impl MessageData for SETUP_SIGNING_DATA {
27644    type Message = MavMessage;
27645    const ID: u32 = 256u32;
27646    const NAME: &'static str = "SETUP_SIGNING";
27647    const EXTRA_CRC: u8 = 71u8;
27648    const ENCODED_LEN: usize = 42usize;
27649    fn deser(
27650        _version: MavlinkVersion,
27651        __input: &[u8],
27652    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27653        let avail_len = __input.len();
27654        let mut payload_buf = [0; Self::ENCODED_LEN];
27655        let mut buf = if avail_len < Self::ENCODED_LEN {
27656            payload_buf[0..avail_len].copy_from_slice(__input);
27657            Bytes::new(&payload_buf)
27658        } else {
27659            Bytes::new(__input)
27660        };
27661        let mut __struct = Self::default();
27662        __struct.initial_timestamp = buf.get_u64_le();
27663        __struct.target_system = buf.get_u8();
27664        __struct.target_component = buf.get_u8();
27665        for v in &mut __struct.secret_key {
27666            let val = buf.get_u8();
27667            *v = val;
27668        }
27669        Ok(__struct)
27670    }
27671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27672        let mut __tmp = BytesMut::new(bytes);
27673        #[allow(clippy::absurd_extreme_comparisons)]
27674        #[allow(unused_comparisons)]
27675        if __tmp.remaining() < Self::ENCODED_LEN {
27676            panic!(
27677                "buffer is too small (need {} bytes, but got {})",
27678                Self::ENCODED_LEN,
27679                __tmp.remaining(),
27680            )
27681        }
27682        __tmp.put_u64_le(self.initial_timestamp);
27683        __tmp.put_u8(self.target_system);
27684        __tmp.put_u8(self.target_component);
27685        for val in &self.secret_key {
27686            __tmp.put_u8(*val);
27687        }
27688        if matches!(version, MavlinkVersion::V2) {
27689            let len = __tmp.len();
27690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27691        } else {
27692            __tmp.len()
27693        }
27694    }
27695}
27696#[doc = "Set the vehicle attitude and body angular rates."]
27697#[doc = ""]
27698#[doc = "ID: 139"]
27699#[derive(Debug, Clone, PartialEq)]
27700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27702#[cfg_attr(feature = "ts", derive(TS))]
27703#[cfg_attr(feature = "ts", ts(export))]
27704pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27705    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27706    pub time_usec: u64,
27707    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27710    pub controls: [f32; 8],
27711    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27712    pub group_mlx: u8,
27713    #[doc = "System ID"]
27714    pub target_system: u8,
27715    #[doc = "Component ID"]
27716    pub target_component: u8,
27717}
27718impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27719    pub const ENCODED_LEN: usize = 43usize;
27720    pub const DEFAULT: Self = Self {
27721        time_usec: 0_u64,
27722        controls: [0.0_f32; 8usize],
27723        group_mlx: 0_u8,
27724        target_system: 0_u8,
27725        target_component: 0_u8,
27726    };
27727    #[cfg(feature = "arbitrary")]
27728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27729        use arbitrary::{Arbitrary, Unstructured};
27730        let mut buf = [0u8; 1024];
27731        rng.fill_bytes(&mut buf);
27732        let mut unstructured = Unstructured::new(&buf);
27733        Self::arbitrary(&mut unstructured).unwrap_or_default()
27734    }
27735}
27736impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27737    fn default() -> Self {
27738        Self::DEFAULT.clone()
27739    }
27740}
27741impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27742    type Message = MavMessage;
27743    const ID: u32 = 139u32;
27744    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27745    const EXTRA_CRC: u8 = 168u8;
27746    const ENCODED_LEN: usize = 43usize;
27747    fn deser(
27748        _version: MavlinkVersion,
27749        __input: &[u8],
27750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27751        let avail_len = __input.len();
27752        let mut payload_buf = [0; Self::ENCODED_LEN];
27753        let mut buf = if avail_len < Self::ENCODED_LEN {
27754            payload_buf[0..avail_len].copy_from_slice(__input);
27755            Bytes::new(&payload_buf)
27756        } else {
27757            Bytes::new(__input)
27758        };
27759        let mut __struct = Self::default();
27760        __struct.time_usec = buf.get_u64_le();
27761        for v in &mut __struct.controls {
27762            let val = buf.get_f32_le();
27763            *v = val;
27764        }
27765        __struct.group_mlx = buf.get_u8();
27766        __struct.target_system = buf.get_u8();
27767        __struct.target_component = buf.get_u8();
27768        Ok(__struct)
27769    }
27770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27771        let mut __tmp = BytesMut::new(bytes);
27772        #[allow(clippy::absurd_extreme_comparisons)]
27773        #[allow(unused_comparisons)]
27774        if __tmp.remaining() < Self::ENCODED_LEN {
27775            panic!(
27776                "buffer is too small (need {} bytes, but got {})",
27777                Self::ENCODED_LEN,
27778                __tmp.remaining(),
27779            )
27780        }
27781        __tmp.put_u64_le(self.time_usec);
27782        for val in &self.controls {
27783            __tmp.put_f32_le(*val);
27784        }
27785        __tmp.put_u8(self.group_mlx);
27786        __tmp.put_u8(self.target_system);
27787        __tmp.put_u8(self.target_component);
27788        if matches!(version, MavlinkVersion::V2) {
27789            let len = __tmp.len();
27790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27791        } else {
27792            __tmp.len()
27793        }
27794    }
27795}
27796#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27797#[doc = ""]
27798#[doc = "ID: 82"]
27799#[derive(Debug, Clone, PartialEq)]
27800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27802#[cfg_attr(feature = "ts", derive(TS))]
27803#[cfg_attr(feature = "ts", ts(export))]
27804pub struct SET_ATTITUDE_TARGET_DATA {
27805    #[doc = "Timestamp (time since system boot)."]
27806    pub time_boot_ms: u32,
27807    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27808    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27809    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27810    pub q: [f32; 4],
27811    #[doc = "Body roll rate"]
27812    pub body_roll_rate: f32,
27813    #[doc = "Body pitch rate"]
27814    pub body_pitch_rate: f32,
27815    #[doc = "Body yaw rate"]
27816    pub body_yaw_rate: f32,
27817    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27818    pub thrust: f32,
27819    #[doc = "System ID"]
27820    pub target_system: u8,
27821    #[doc = "Component ID"]
27822    pub target_component: u8,
27823    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27824    pub type_mask: AttitudeTargetTypemask,
27825    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27829    pub thrust_body: [f32; 3],
27830}
27831impl SET_ATTITUDE_TARGET_DATA {
27832    pub const ENCODED_LEN: usize = 51usize;
27833    pub const DEFAULT: Self = Self {
27834        time_boot_ms: 0_u32,
27835        q: [0.0_f32; 4usize],
27836        body_roll_rate: 0.0_f32,
27837        body_pitch_rate: 0.0_f32,
27838        body_yaw_rate: 0.0_f32,
27839        thrust: 0.0_f32,
27840        target_system: 0_u8,
27841        target_component: 0_u8,
27842        type_mask: AttitudeTargetTypemask::DEFAULT,
27843        thrust_body: [0.0_f32; 3usize],
27844    };
27845    #[cfg(feature = "arbitrary")]
27846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27847        use arbitrary::{Arbitrary, Unstructured};
27848        let mut buf = [0u8; 1024];
27849        rng.fill_bytes(&mut buf);
27850        let mut unstructured = Unstructured::new(&buf);
27851        Self::arbitrary(&mut unstructured).unwrap_or_default()
27852    }
27853}
27854impl Default for SET_ATTITUDE_TARGET_DATA {
27855    fn default() -> Self {
27856        Self::DEFAULT.clone()
27857    }
27858}
27859impl MessageData for SET_ATTITUDE_TARGET_DATA {
27860    type Message = MavMessage;
27861    const ID: u32 = 82u32;
27862    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27863    const EXTRA_CRC: u8 = 49u8;
27864    const ENCODED_LEN: usize = 51usize;
27865    fn deser(
27866        _version: MavlinkVersion,
27867        __input: &[u8],
27868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27869        let avail_len = __input.len();
27870        let mut payload_buf = [0; Self::ENCODED_LEN];
27871        let mut buf = if avail_len < Self::ENCODED_LEN {
27872            payload_buf[0..avail_len].copy_from_slice(__input);
27873            Bytes::new(&payload_buf)
27874        } else {
27875            Bytes::new(__input)
27876        };
27877        let mut __struct = Self::default();
27878        __struct.time_boot_ms = buf.get_u32_le();
27879        for v in &mut __struct.q {
27880            let val = buf.get_f32_le();
27881            *v = val;
27882        }
27883        __struct.body_roll_rate = buf.get_f32_le();
27884        __struct.body_pitch_rate = buf.get_f32_le();
27885        __struct.body_yaw_rate = buf.get_f32_le();
27886        __struct.thrust = buf.get_f32_le();
27887        __struct.target_system = buf.get_u8();
27888        __struct.target_component = buf.get_u8();
27889        let tmp = buf.get_u8();
27890        __struct.type_mask = AttitudeTargetTypemask::from_bits(
27891            tmp & AttitudeTargetTypemask::all().bits(),
27892        )
27893        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27894            flag_type: "AttitudeTargetTypemask",
27895            value: tmp as u32,
27896        })?;
27897        for v in &mut __struct.thrust_body {
27898            let val = buf.get_f32_le();
27899            *v = val;
27900        }
27901        Ok(__struct)
27902    }
27903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27904        let mut __tmp = BytesMut::new(bytes);
27905        #[allow(clippy::absurd_extreme_comparisons)]
27906        #[allow(unused_comparisons)]
27907        if __tmp.remaining() < Self::ENCODED_LEN {
27908            panic!(
27909                "buffer is too small (need {} bytes, but got {})",
27910                Self::ENCODED_LEN,
27911                __tmp.remaining(),
27912            )
27913        }
27914        __tmp.put_u32_le(self.time_boot_ms);
27915        for val in &self.q {
27916            __tmp.put_f32_le(*val);
27917        }
27918        __tmp.put_f32_le(self.body_roll_rate);
27919        __tmp.put_f32_le(self.body_pitch_rate);
27920        __tmp.put_f32_le(self.body_yaw_rate);
27921        __tmp.put_f32_le(self.thrust);
27922        __tmp.put_u8(self.target_system);
27923        __tmp.put_u8(self.target_component);
27924        __tmp.put_u8(self.type_mask.bits());
27925        if matches!(version, MavlinkVersion::V2) {
27926            for val in &self.thrust_body {
27927                __tmp.put_f32_le(*val);
27928            }
27929            let len = __tmp.len();
27930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27931        } else {
27932            __tmp.len()
27933        }
27934    }
27935}
27936#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27937#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27938#[doc = ""]
27939#[doc = "ID: 48"]
27940#[derive(Debug, Clone, PartialEq)]
27941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27943#[cfg_attr(feature = "ts", derive(TS))]
27944#[cfg_attr(feature = "ts", ts(export))]
27945pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27946    #[doc = "Latitude (WGS84)"]
27947    pub latitude: i32,
27948    #[doc = "Longitude (WGS84)"]
27949    pub longitude: i32,
27950    #[doc = "Altitude (MSL). Positive for up."]
27951    pub altitude: i32,
27952    #[doc = "System ID"]
27953    pub target_system: u8,
27954    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27955    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27956    pub time_usec: u64,
27957}
27958impl SET_GPS_GLOBAL_ORIGIN_DATA {
27959    pub const ENCODED_LEN: usize = 21usize;
27960    pub const DEFAULT: Self = Self {
27961        latitude: 0_i32,
27962        longitude: 0_i32,
27963        altitude: 0_i32,
27964        target_system: 0_u8,
27965        time_usec: 0_u64,
27966    };
27967    #[cfg(feature = "arbitrary")]
27968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27969        use arbitrary::{Arbitrary, Unstructured};
27970        let mut buf = [0u8; 1024];
27971        rng.fill_bytes(&mut buf);
27972        let mut unstructured = Unstructured::new(&buf);
27973        Self::arbitrary(&mut unstructured).unwrap_or_default()
27974    }
27975}
27976impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27977    fn default() -> Self {
27978        Self::DEFAULT.clone()
27979    }
27980}
27981impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27982    type Message = MavMessage;
27983    const ID: u32 = 48u32;
27984    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27985    const EXTRA_CRC: u8 = 41u8;
27986    const ENCODED_LEN: usize = 21usize;
27987    fn deser(
27988        _version: MavlinkVersion,
27989        __input: &[u8],
27990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27991        let avail_len = __input.len();
27992        let mut payload_buf = [0; Self::ENCODED_LEN];
27993        let mut buf = if avail_len < Self::ENCODED_LEN {
27994            payload_buf[0..avail_len].copy_from_slice(__input);
27995            Bytes::new(&payload_buf)
27996        } else {
27997            Bytes::new(__input)
27998        };
27999        let mut __struct = Self::default();
28000        __struct.latitude = buf.get_i32_le();
28001        __struct.longitude = buf.get_i32_le();
28002        __struct.altitude = buf.get_i32_le();
28003        __struct.target_system = buf.get_u8();
28004        __struct.time_usec = buf.get_u64_le();
28005        Ok(__struct)
28006    }
28007    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28008        let mut __tmp = BytesMut::new(bytes);
28009        #[allow(clippy::absurd_extreme_comparisons)]
28010        #[allow(unused_comparisons)]
28011        if __tmp.remaining() < Self::ENCODED_LEN {
28012            panic!(
28013                "buffer is too small (need {} bytes, but got {})",
28014                Self::ENCODED_LEN,
28015                __tmp.remaining(),
28016            )
28017        }
28018        __tmp.put_i32_le(self.latitude);
28019        __tmp.put_i32_le(self.longitude);
28020        __tmp.put_i32_le(self.altitude);
28021        __tmp.put_u8(self.target_system);
28022        if matches!(version, MavlinkVersion::V2) {
28023            __tmp.put_u64_le(self.time_usec);
28024            let len = __tmp.len();
28025            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28026        } else {
28027            __tmp.len()
28028        }
28029    }
28030}
28031#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28032#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28033#[doc = ""]
28034#[doc = "ID: 243"]
28035#[derive(Debug, Clone, PartialEq)]
28036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28038#[cfg_attr(feature = "ts", derive(TS))]
28039#[cfg_attr(feature = "ts", ts(export))]
28040pub struct SET_HOME_POSITION_DATA {
28041    #[doc = "Latitude (WGS84)"]
28042    pub latitude: i32,
28043    #[doc = "Longitude (WGS84)"]
28044    pub longitude: i32,
28045    #[doc = "Altitude (MSL). Positive for up."]
28046    pub altitude: i32,
28047    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28048    pub x: f32,
28049    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28050    pub y: f32,
28051    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28052    pub z: f32,
28053    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28054    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28055    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28056    pub q: [f32; 4],
28057    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28058    pub approach_x: f32,
28059    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28060    pub approach_y: f32,
28061    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28062    pub approach_z: f32,
28063    #[doc = "System ID."]
28064    pub target_system: u8,
28065    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28066    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28067    pub time_usec: u64,
28068}
28069impl SET_HOME_POSITION_DATA {
28070    pub const ENCODED_LEN: usize = 61usize;
28071    pub const DEFAULT: Self = Self {
28072        latitude: 0_i32,
28073        longitude: 0_i32,
28074        altitude: 0_i32,
28075        x: 0.0_f32,
28076        y: 0.0_f32,
28077        z: 0.0_f32,
28078        q: [0.0_f32; 4usize],
28079        approach_x: 0.0_f32,
28080        approach_y: 0.0_f32,
28081        approach_z: 0.0_f32,
28082        target_system: 0_u8,
28083        time_usec: 0_u64,
28084    };
28085    #[cfg(feature = "arbitrary")]
28086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28087        use arbitrary::{Arbitrary, Unstructured};
28088        let mut buf = [0u8; 1024];
28089        rng.fill_bytes(&mut buf);
28090        let mut unstructured = Unstructured::new(&buf);
28091        Self::arbitrary(&mut unstructured).unwrap_or_default()
28092    }
28093}
28094impl Default for SET_HOME_POSITION_DATA {
28095    fn default() -> Self {
28096        Self::DEFAULT.clone()
28097    }
28098}
28099impl MessageData for SET_HOME_POSITION_DATA {
28100    type Message = MavMessage;
28101    const ID: u32 = 243u32;
28102    const NAME: &'static str = "SET_HOME_POSITION";
28103    const EXTRA_CRC: u8 = 85u8;
28104    const ENCODED_LEN: usize = 61usize;
28105    fn deser(
28106        _version: MavlinkVersion,
28107        __input: &[u8],
28108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28109        let avail_len = __input.len();
28110        let mut payload_buf = [0; Self::ENCODED_LEN];
28111        let mut buf = if avail_len < Self::ENCODED_LEN {
28112            payload_buf[0..avail_len].copy_from_slice(__input);
28113            Bytes::new(&payload_buf)
28114        } else {
28115            Bytes::new(__input)
28116        };
28117        let mut __struct = Self::default();
28118        __struct.latitude = buf.get_i32_le();
28119        __struct.longitude = buf.get_i32_le();
28120        __struct.altitude = buf.get_i32_le();
28121        __struct.x = buf.get_f32_le();
28122        __struct.y = buf.get_f32_le();
28123        __struct.z = buf.get_f32_le();
28124        for v in &mut __struct.q {
28125            let val = buf.get_f32_le();
28126            *v = val;
28127        }
28128        __struct.approach_x = buf.get_f32_le();
28129        __struct.approach_y = buf.get_f32_le();
28130        __struct.approach_z = buf.get_f32_le();
28131        __struct.target_system = buf.get_u8();
28132        __struct.time_usec = buf.get_u64_le();
28133        Ok(__struct)
28134    }
28135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28136        let mut __tmp = BytesMut::new(bytes);
28137        #[allow(clippy::absurd_extreme_comparisons)]
28138        #[allow(unused_comparisons)]
28139        if __tmp.remaining() < Self::ENCODED_LEN {
28140            panic!(
28141                "buffer is too small (need {} bytes, but got {})",
28142                Self::ENCODED_LEN,
28143                __tmp.remaining(),
28144            )
28145        }
28146        __tmp.put_i32_le(self.latitude);
28147        __tmp.put_i32_le(self.longitude);
28148        __tmp.put_i32_le(self.altitude);
28149        __tmp.put_f32_le(self.x);
28150        __tmp.put_f32_le(self.y);
28151        __tmp.put_f32_le(self.z);
28152        for val in &self.q {
28153            __tmp.put_f32_le(*val);
28154        }
28155        __tmp.put_f32_le(self.approach_x);
28156        __tmp.put_f32_le(self.approach_y);
28157        __tmp.put_f32_le(self.approach_z);
28158        __tmp.put_u8(self.target_system);
28159        if matches!(version, MavlinkVersion::V2) {
28160            __tmp.put_u64_le(self.time_usec);
28161            let len = __tmp.len();
28162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28163        } else {
28164            __tmp.len()
28165        }
28166    }
28167}
28168#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28169#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28170#[doc = ""]
28171#[doc = "ID: 11"]
28172#[derive(Debug, Clone, PartialEq)]
28173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28175#[cfg_attr(feature = "ts", derive(TS))]
28176#[cfg_attr(feature = "ts", ts(export))]
28177pub struct SET_MODE_DATA {
28178    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28179    pub custom_mode: u32,
28180    #[doc = "The system setting the mode"]
28181    pub target_system: u8,
28182    #[doc = "The new base mode."]
28183    pub base_mode: MavMode,
28184}
28185impl SET_MODE_DATA {
28186    pub const ENCODED_LEN: usize = 6usize;
28187    pub const DEFAULT: Self = Self {
28188        custom_mode: 0_u32,
28189        target_system: 0_u8,
28190        base_mode: MavMode::DEFAULT,
28191    };
28192    #[cfg(feature = "arbitrary")]
28193    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28194        use arbitrary::{Arbitrary, Unstructured};
28195        let mut buf = [0u8; 1024];
28196        rng.fill_bytes(&mut buf);
28197        let mut unstructured = Unstructured::new(&buf);
28198        Self::arbitrary(&mut unstructured).unwrap_or_default()
28199    }
28200}
28201impl Default for SET_MODE_DATA {
28202    fn default() -> Self {
28203        Self::DEFAULT.clone()
28204    }
28205}
28206impl MessageData for SET_MODE_DATA {
28207    type Message = MavMessage;
28208    const ID: u32 = 11u32;
28209    const NAME: &'static str = "SET_MODE";
28210    const EXTRA_CRC: u8 = 89u8;
28211    const ENCODED_LEN: usize = 6usize;
28212    fn deser(
28213        _version: MavlinkVersion,
28214        __input: &[u8],
28215    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28216        let avail_len = __input.len();
28217        let mut payload_buf = [0; Self::ENCODED_LEN];
28218        let mut buf = if avail_len < Self::ENCODED_LEN {
28219            payload_buf[0..avail_len].copy_from_slice(__input);
28220            Bytes::new(&payload_buf)
28221        } else {
28222            Bytes::new(__input)
28223        };
28224        let mut __struct = Self::default();
28225        __struct.custom_mode = buf.get_u32_le();
28226        __struct.target_system = buf.get_u8();
28227        let tmp = buf.get_u8();
28228        __struct.base_mode =
28229            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28230                enum_type: "MavMode",
28231                value: tmp as u32,
28232            })?;
28233        Ok(__struct)
28234    }
28235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28236        let mut __tmp = BytesMut::new(bytes);
28237        #[allow(clippy::absurd_extreme_comparisons)]
28238        #[allow(unused_comparisons)]
28239        if __tmp.remaining() < Self::ENCODED_LEN {
28240            panic!(
28241                "buffer is too small (need {} bytes, but got {})",
28242                Self::ENCODED_LEN,
28243                __tmp.remaining(),
28244            )
28245        }
28246        __tmp.put_u32_le(self.custom_mode);
28247        __tmp.put_u8(self.target_system);
28248        __tmp.put_u8(self.base_mode as u8);
28249        if matches!(version, MavlinkVersion::V2) {
28250            let len = __tmp.len();
28251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28252        } else {
28253            __tmp.len()
28254        }
28255    }
28256}
28257#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28258#[doc = ""]
28259#[doc = "ID: 86"]
28260#[derive(Debug, Clone, PartialEq)]
28261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28263#[cfg_attr(feature = "ts", derive(TS))]
28264#[cfg_attr(feature = "ts", ts(export))]
28265pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28266    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28267    pub time_boot_ms: u32,
28268    #[doc = "Latitude in WGS84 frame"]
28269    pub lat_int: i32,
28270    #[doc = "Longitude in WGS84 frame"]
28271    pub lon_int: i32,
28272    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28273    pub alt: f32,
28274    #[doc = "X velocity in NED frame"]
28275    pub vx: f32,
28276    #[doc = "Y velocity in NED frame"]
28277    pub vy: f32,
28278    #[doc = "Z velocity in NED frame"]
28279    pub vz: f32,
28280    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28281    pub afx: f32,
28282    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28283    pub afy: f32,
28284    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28285    pub afz: f32,
28286    #[doc = "yaw setpoint"]
28287    pub yaw: f32,
28288    #[doc = "yaw rate setpoint"]
28289    pub yaw_rate: f32,
28290    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28291    pub type_mask: PositionTargetTypemask,
28292    #[doc = "System ID"]
28293    pub target_system: u8,
28294    #[doc = "Component ID"]
28295    pub target_component: u8,
28296    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28297    pub coordinate_frame: MavFrame,
28298}
28299impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28300    pub const ENCODED_LEN: usize = 53usize;
28301    pub const DEFAULT: Self = Self {
28302        time_boot_ms: 0_u32,
28303        lat_int: 0_i32,
28304        lon_int: 0_i32,
28305        alt: 0.0_f32,
28306        vx: 0.0_f32,
28307        vy: 0.0_f32,
28308        vz: 0.0_f32,
28309        afx: 0.0_f32,
28310        afy: 0.0_f32,
28311        afz: 0.0_f32,
28312        yaw: 0.0_f32,
28313        yaw_rate: 0.0_f32,
28314        type_mask: PositionTargetTypemask::DEFAULT,
28315        target_system: 0_u8,
28316        target_component: 0_u8,
28317        coordinate_frame: MavFrame::DEFAULT,
28318    };
28319    #[cfg(feature = "arbitrary")]
28320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28321        use arbitrary::{Arbitrary, Unstructured};
28322        let mut buf = [0u8; 1024];
28323        rng.fill_bytes(&mut buf);
28324        let mut unstructured = Unstructured::new(&buf);
28325        Self::arbitrary(&mut unstructured).unwrap_or_default()
28326    }
28327}
28328impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28329    fn default() -> Self {
28330        Self::DEFAULT.clone()
28331    }
28332}
28333impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28334    type Message = MavMessage;
28335    const ID: u32 = 86u32;
28336    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28337    const EXTRA_CRC: u8 = 5u8;
28338    const ENCODED_LEN: usize = 53usize;
28339    fn deser(
28340        _version: MavlinkVersion,
28341        __input: &[u8],
28342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28343        let avail_len = __input.len();
28344        let mut payload_buf = [0; Self::ENCODED_LEN];
28345        let mut buf = if avail_len < Self::ENCODED_LEN {
28346            payload_buf[0..avail_len].copy_from_slice(__input);
28347            Bytes::new(&payload_buf)
28348        } else {
28349            Bytes::new(__input)
28350        };
28351        let mut __struct = Self::default();
28352        __struct.time_boot_ms = buf.get_u32_le();
28353        __struct.lat_int = buf.get_i32_le();
28354        __struct.lon_int = buf.get_i32_le();
28355        __struct.alt = buf.get_f32_le();
28356        __struct.vx = buf.get_f32_le();
28357        __struct.vy = buf.get_f32_le();
28358        __struct.vz = buf.get_f32_le();
28359        __struct.afx = buf.get_f32_le();
28360        __struct.afy = buf.get_f32_le();
28361        __struct.afz = buf.get_f32_le();
28362        __struct.yaw = buf.get_f32_le();
28363        __struct.yaw_rate = buf.get_f32_le();
28364        let tmp = buf.get_u16_le();
28365        __struct.type_mask = PositionTargetTypemask::from_bits(
28366            tmp & PositionTargetTypemask::all().bits(),
28367        )
28368        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28369            flag_type: "PositionTargetTypemask",
28370            value: tmp as u32,
28371        })?;
28372        __struct.target_system = buf.get_u8();
28373        __struct.target_component = buf.get_u8();
28374        let tmp = buf.get_u8();
28375        __struct.coordinate_frame =
28376            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28377                enum_type: "MavFrame",
28378                value: tmp as u32,
28379            })?;
28380        Ok(__struct)
28381    }
28382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28383        let mut __tmp = BytesMut::new(bytes);
28384        #[allow(clippy::absurd_extreme_comparisons)]
28385        #[allow(unused_comparisons)]
28386        if __tmp.remaining() < Self::ENCODED_LEN {
28387            panic!(
28388                "buffer is too small (need {} bytes, but got {})",
28389                Self::ENCODED_LEN,
28390                __tmp.remaining(),
28391            )
28392        }
28393        __tmp.put_u32_le(self.time_boot_ms);
28394        __tmp.put_i32_le(self.lat_int);
28395        __tmp.put_i32_le(self.lon_int);
28396        __tmp.put_f32_le(self.alt);
28397        __tmp.put_f32_le(self.vx);
28398        __tmp.put_f32_le(self.vy);
28399        __tmp.put_f32_le(self.vz);
28400        __tmp.put_f32_le(self.afx);
28401        __tmp.put_f32_le(self.afy);
28402        __tmp.put_f32_le(self.afz);
28403        __tmp.put_f32_le(self.yaw);
28404        __tmp.put_f32_le(self.yaw_rate);
28405        __tmp.put_u16_le(self.type_mask.bits());
28406        __tmp.put_u8(self.target_system);
28407        __tmp.put_u8(self.target_component);
28408        __tmp.put_u8(self.coordinate_frame as u8);
28409        if matches!(version, MavlinkVersion::V2) {
28410            let len = __tmp.len();
28411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28412        } else {
28413            __tmp.len()
28414        }
28415    }
28416}
28417#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28418#[doc = ""]
28419#[doc = "ID: 84"]
28420#[derive(Debug, Clone, PartialEq)]
28421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28423#[cfg_attr(feature = "ts", derive(TS))]
28424#[cfg_attr(feature = "ts", ts(export))]
28425pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28426    #[doc = "Timestamp (time since system boot)."]
28427    pub time_boot_ms: u32,
28428    #[doc = "X Position in NED frame"]
28429    pub x: f32,
28430    #[doc = "Y Position in NED frame"]
28431    pub y: f32,
28432    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28433    pub z: f32,
28434    #[doc = "X velocity in NED frame"]
28435    pub vx: f32,
28436    #[doc = "Y velocity in NED frame"]
28437    pub vy: f32,
28438    #[doc = "Z velocity in NED frame"]
28439    pub vz: f32,
28440    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28441    pub afx: f32,
28442    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28443    pub afy: f32,
28444    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28445    pub afz: f32,
28446    #[doc = "yaw setpoint"]
28447    pub yaw: f32,
28448    #[doc = "yaw rate setpoint"]
28449    pub yaw_rate: f32,
28450    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28451    pub type_mask: PositionTargetTypemask,
28452    #[doc = "System ID"]
28453    pub target_system: u8,
28454    #[doc = "Component ID"]
28455    pub target_component: u8,
28456    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28457    pub coordinate_frame: MavFrame,
28458}
28459impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28460    pub const ENCODED_LEN: usize = 53usize;
28461    pub const DEFAULT: Self = Self {
28462        time_boot_ms: 0_u32,
28463        x: 0.0_f32,
28464        y: 0.0_f32,
28465        z: 0.0_f32,
28466        vx: 0.0_f32,
28467        vy: 0.0_f32,
28468        vz: 0.0_f32,
28469        afx: 0.0_f32,
28470        afy: 0.0_f32,
28471        afz: 0.0_f32,
28472        yaw: 0.0_f32,
28473        yaw_rate: 0.0_f32,
28474        type_mask: PositionTargetTypemask::DEFAULT,
28475        target_system: 0_u8,
28476        target_component: 0_u8,
28477        coordinate_frame: MavFrame::DEFAULT,
28478    };
28479    #[cfg(feature = "arbitrary")]
28480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28481        use arbitrary::{Arbitrary, Unstructured};
28482        let mut buf = [0u8; 1024];
28483        rng.fill_bytes(&mut buf);
28484        let mut unstructured = Unstructured::new(&buf);
28485        Self::arbitrary(&mut unstructured).unwrap_or_default()
28486    }
28487}
28488impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28489    fn default() -> Self {
28490        Self::DEFAULT.clone()
28491    }
28492}
28493impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28494    type Message = MavMessage;
28495    const ID: u32 = 84u32;
28496    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28497    const EXTRA_CRC: u8 = 143u8;
28498    const ENCODED_LEN: usize = 53usize;
28499    fn deser(
28500        _version: MavlinkVersion,
28501        __input: &[u8],
28502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28503        let avail_len = __input.len();
28504        let mut payload_buf = [0; Self::ENCODED_LEN];
28505        let mut buf = if avail_len < Self::ENCODED_LEN {
28506            payload_buf[0..avail_len].copy_from_slice(__input);
28507            Bytes::new(&payload_buf)
28508        } else {
28509            Bytes::new(__input)
28510        };
28511        let mut __struct = Self::default();
28512        __struct.time_boot_ms = buf.get_u32_le();
28513        __struct.x = buf.get_f32_le();
28514        __struct.y = buf.get_f32_le();
28515        __struct.z = buf.get_f32_le();
28516        __struct.vx = buf.get_f32_le();
28517        __struct.vy = buf.get_f32_le();
28518        __struct.vz = buf.get_f32_le();
28519        __struct.afx = buf.get_f32_le();
28520        __struct.afy = buf.get_f32_le();
28521        __struct.afz = buf.get_f32_le();
28522        __struct.yaw = buf.get_f32_le();
28523        __struct.yaw_rate = buf.get_f32_le();
28524        let tmp = buf.get_u16_le();
28525        __struct.type_mask = PositionTargetTypemask::from_bits(
28526            tmp & PositionTargetTypemask::all().bits(),
28527        )
28528        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28529            flag_type: "PositionTargetTypemask",
28530            value: tmp as u32,
28531        })?;
28532        __struct.target_system = buf.get_u8();
28533        __struct.target_component = buf.get_u8();
28534        let tmp = buf.get_u8();
28535        __struct.coordinate_frame =
28536            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28537                enum_type: "MavFrame",
28538                value: tmp as u32,
28539            })?;
28540        Ok(__struct)
28541    }
28542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28543        let mut __tmp = BytesMut::new(bytes);
28544        #[allow(clippy::absurd_extreme_comparisons)]
28545        #[allow(unused_comparisons)]
28546        if __tmp.remaining() < Self::ENCODED_LEN {
28547            panic!(
28548                "buffer is too small (need {} bytes, but got {})",
28549                Self::ENCODED_LEN,
28550                __tmp.remaining(),
28551            )
28552        }
28553        __tmp.put_u32_le(self.time_boot_ms);
28554        __tmp.put_f32_le(self.x);
28555        __tmp.put_f32_le(self.y);
28556        __tmp.put_f32_le(self.z);
28557        __tmp.put_f32_le(self.vx);
28558        __tmp.put_f32_le(self.vy);
28559        __tmp.put_f32_le(self.vz);
28560        __tmp.put_f32_le(self.afx);
28561        __tmp.put_f32_le(self.afy);
28562        __tmp.put_f32_le(self.afz);
28563        __tmp.put_f32_le(self.yaw);
28564        __tmp.put_f32_le(self.yaw_rate);
28565        __tmp.put_u16_le(self.type_mask.bits());
28566        __tmp.put_u8(self.target_system);
28567        __tmp.put_u8(self.target_component);
28568        __tmp.put_u8(self.coordinate_frame as u8);
28569        if matches!(version, MavlinkVersion::V2) {
28570            let len = __tmp.len();
28571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28572        } else {
28573            __tmp.len()
28574        }
28575    }
28576}
28577#[doc = "Status of simulation environment, if used."]
28578#[doc = ""]
28579#[doc = "ID: 108"]
28580#[derive(Debug, Clone, PartialEq)]
28581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28583#[cfg_attr(feature = "ts", derive(TS))]
28584#[cfg_attr(feature = "ts", ts(export))]
28585pub struct SIM_STATE_DATA {
28586    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28587    pub q1: f32,
28588    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28589    pub q2: f32,
28590    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28591    pub q3: f32,
28592    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28593    pub q4: f32,
28594    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28595    pub roll: f32,
28596    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28597    pub pitch: f32,
28598    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28599    pub yaw: f32,
28600    #[doc = "X acceleration"]
28601    pub xacc: f32,
28602    #[doc = "Y acceleration"]
28603    pub yacc: f32,
28604    #[doc = "Z acceleration"]
28605    pub zacc: f32,
28606    #[doc = "Angular speed around X axis"]
28607    pub xgyro: f32,
28608    #[doc = "Angular speed around Y axis"]
28609    pub ygyro: f32,
28610    #[doc = "Angular speed around Z axis"]
28611    pub zgyro: f32,
28612    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28613    pub lat: f32,
28614    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28615    pub lon: f32,
28616    #[doc = "Altitude"]
28617    pub alt: f32,
28618    #[doc = "Horizontal position standard deviation"]
28619    pub std_dev_horz: f32,
28620    #[doc = "Vertical position standard deviation"]
28621    pub std_dev_vert: f32,
28622    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28623    pub vn: f32,
28624    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28625    pub ve: f32,
28626    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28627    pub vd: f32,
28628    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28629    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28630    pub lat_int: i32,
28631    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28632    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28633    pub lon_int: i32,
28634}
28635impl SIM_STATE_DATA {
28636    pub const ENCODED_LEN: usize = 92usize;
28637    pub const DEFAULT: Self = Self {
28638        q1: 0.0_f32,
28639        q2: 0.0_f32,
28640        q3: 0.0_f32,
28641        q4: 0.0_f32,
28642        roll: 0.0_f32,
28643        pitch: 0.0_f32,
28644        yaw: 0.0_f32,
28645        xacc: 0.0_f32,
28646        yacc: 0.0_f32,
28647        zacc: 0.0_f32,
28648        xgyro: 0.0_f32,
28649        ygyro: 0.0_f32,
28650        zgyro: 0.0_f32,
28651        lat: 0.0_f32,
28652        lon: 0.0_f32,
28653        alt: 0.0_f32,
28654        std_dev_horz: 0.0_f32,
28655        std_dev_vert: 0.0_f32,
28656        vn: 0.0_f32,
28657        ve: 0.0_f32,
28658        vd: 0.0_f32,
28659        lat_int: 0_i32,
28660        lon_int: 0_i32,
28661    };
28662    #[cfg(feature = "arbitrary")]
28663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28664        use arbitrary::{Arbitrary, Unstructured};
28665        let mut buf = [0u8; 1024];
28666        rng.fill_bytes(&mut buf);
28667        let mut unstructured = Unstructured::new(&buf);
28668        Self::arbitrary(&mut unstructured).unwrap_or_default()
28669    }
28670}
28671impl Default for SIM_STATE_DATA {
28672    fn default() -> Self {
28673        Self::DEFAULT.clone()
28674    }
28675}
28676impl MessageData for SIM_STATE_DATA {
28677    type Message = MavMessage;
28678    const ID: u32 = 108u32;
28679    const NAME: &'static str = "SIM_STATE";
28680    const EXTRA_CRC: u8 = 32u8;
28681    const ENCODED_LEN: usize = 92usize;
28682    fn deser(
28683        _version: MavlinkVersion,
28684        __input: &[u8],
28685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28686        let avail_len = __input.len();
28687        let mut payload_buf = [0; Self::ENCODED_LEN];
28688        let mut buf = if avail_len < Self::ENCODED_LEN {
28689            payload_buf[0..avail_len].copy_from_slice(__input);
28690            Bytes::new(&payload_buf)
28691        } else {
28692            Bytes::new(__input)
28693        };
28694        let mut __struct = Self::default();
28695        __struct.q1 = buf.get_f32_le();
28696        __struct.q2 = buf.get_f32_le();
28697        __struct.q3 = buf.get_f32_le();
28698        __struct.q4 = buf.get_f32_le();
28699        __struct.roll = buf.get_f32_le();
28700        __struct.pitch = buf.get_f32_le();
28701        __struct.yaw = buf.get_f32_le();
28702        __struct.xacc = buf.get_f32_le();
28703        __struct.yacc = buf.get_f32_le();
28704        __struct.zacc = buf.get_f32_le();
28705        __struct.xgyro = buf.get_f32_le();
28706        __struct.ygyro = buf.get_f32_le();
28707        __struct.zgyro = buf.get_f32_le();
28708        __struct.lat = buf.get_f32_le();
28709        __struct.lon = buf.get_f32_le();
28710        __struct.alt = buf.get_f32_le();
28711        __struct.std_dev_horz = buf.get_f32_le();
28712        __struct.std_dev_vert = buf.get_f32_le();
28713        __struct.vn = buf.get_f32_le();
28714        __struct.ve = buf.get_f32_le();
28715        __struct.vd = buf.get_f32_le();
28716        __struct.lat_int = buf.get_i32_le();
28717        __struct.lon_int = buf.get_i32_le();
28718        Ok(__struct)
28719    }
28720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28721        let mut __tmp = BytesMut::new(bytes);
28722        #[allow(clippy::absurd_extreme_comparisons)]
28723        #[allow(unused_comparisons)]
28724        if __tmp.remaining() < Self::ENCODED_LEN {
28725            panic!(
28726                "buffer is too small (need {} bytes, but got {})",
28727                Self::ENCODED_LEN,
28728                __tmp.remaining(),
28729            )
28730        }
28731        __tmp.put_f32_le(self.q1);
28732        __tmp.put_f32_le(self.q2);
28733        __tmp.put_f32_le(self.q3);
28734        __tmp.put_f32_le(self.q4);
28735        __tmp.put_f32_le(self.roll);
28736        __tmp.put_f32_le(self.pitch);
28737        __tmp.put_f32_le(self.yaw);
28738        __tmp.put_f32_le(self.xacc);
28739        __tmp.put_f32_le(self.yacc);
28740        __tmp.put_f32_le(self.zacc);
28741        __tmp.put_f32_le(self.xgyro);
28742        __tmp.put_f32_le(self.ygyro);
28743        __tmp.put_f32_le(self.zgyro);
28744        __tmp.put_f32_le(self.lat);
28745        __tmp.put_f32_le(self.lon);
28746        __tmp.put_f32_le(self.alt);
28747        __tmp.put_f32_le(self.std_dev_horz);
28748        __tmp.put_f32_le(self.std_dev_vert);
28749        __tmp.put_f32_le(self.vn);
28750        __tmp.put_f32_le(self.ve);
28751        __tmp.put_f32_le(self.vd);
28752        if matches!(version, MavlinkVersion::V2) {
28753            __tmp.put_i32_le(self.lat_int);
28754            __tmp.put_i32_le(self.lon_int);
28755            let len = __tmp.len();
28756            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28757        } else {
28758            __tmp.len()
28759        }
28760    }
28761}
28762#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28763#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28764#[doc = ""]
28765#[doc = "ID: 370"]
28766#[derive(Debug, Clone, PartialEq)]
28767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28769#[cfg_attr(feature = "ts", derive(TS))]
28770#[cfg_attr(feature = "ts", ts(export))]
28771pub struct SMART_BATTERY_INFO_DATA {
28772    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28773    pub capacity_full_specification: i32,
28774    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28775    pub capacity_full: i32,
28776    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28777    pub cycle_count: u16,
28778    #[doc = "Battery weight. 0: field not provided."]
28779    pub weight: u16,
28780    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28781    pub discharge_minimum_voltage: u16,
28782    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28783    pub charging_minimum_voltage: u16,
28784    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28785    pub resting_minimum_voltage: u16,
28786    #[doc = "Battery ID"]
28787    pub id: u8,
28788    #[doc = "Function of the battery"]
28789    pub battery_function: MavBatteryFunction,
28790    #[doc = "Type (chemistry) of the battery"]
28791    pub mavtype: MavBatteryType,
28792    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28793    #[cfg_attr(
28794        feature = "serde",
28795        serde(
28796            serialize_with = "crate::nulstr::serialize::<_, 16>",
28797            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
28798        )
28799    )]
28800    #[cfg_attr(feature = "ts", ts(type = "string"))]
28801    pub serial_number: [u8; 16],
28802    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28803    #[cfg_attr(
28804        feature = "serde",
28805        serde(
28806            serialize_with = "crate::nulstr::serialize::<_, 50>",
28807            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
28808        )
28809    )]
28810    #[cfg_attr(feature = "ts", ts(type = "string"))]
28811    pub device_name: [u8; 50],
28812    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28814    pub charging_maximum_voltage: u16,
28815    #[doc = "Number of battery cells in series. 0: field not provided."]
28816    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28817    pub cells_in_series: u8,
28818    #[doc = "Maximum pack discharge current. 0: field not provided."]
28819    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28820    pub discharge_maximum_current: u32,
28821    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28822    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28823    pub discharge_maximum_burst_current: u32,
28824    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28825    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28826    #[cfg_attr(
28827        feature = "serde",
28828        serde(
28829            serialize_with = "crate::nulstr::serialize::<_, 11>",
28830            deserialize_with = "crate::nulstr::deserialize::<_, 11>"
28831        )
28832    )]
28833    #[cfg_attr(feature = "ts", ts(type = "string"))]
28834    pub manufacture_date: [u8; 11],
28835}
28836impl SMART_BATTERY_INFO_DATA {
28837    pub const ENCODED_LEN: usize = 109usize;
28838    pub const DEFAULT: Self = Self {
28839        capacity_full_specification: 0_i32,
28840        capacity_full: 0_i32,
28841        cycle_count: 0_u16,
28842        weight: 0_u16,
28843        discharge_minimum_voltage: 0_u16,
28844        charging_minimum_voltage: 0_u16,
28845        resting_minimum_voltage: 0_u16,
28846        id: 0_u8,
28847        battery_function: MavBatteryFunction::DEFAULT,
28848        mavtype: MavBatteryType::DEFAULT,
28849        serial_number: [0_u8; 16usize],
28850        device_name: [0_u8; 50usize],
28851        charging_maximum_voltage: 0_u16,
28852        cells_in_series: 0_u8,
28853        discharge_maximum_current: 0_u32,
28854        discharge_maximum_burst_current: 0_u32,
28855        manufacture_date: [0_u8; 11usize],
28856    };
28857    #[cfg(feature = "arbitrary")]
28858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28859        use arbitrary::{Arbitrary, Unstructured};
28860        let mut buf = [0u8; 1024];
28861        rng.fill_bytes(&mut buf);
28862        let mut unstructured = Unstructured::new(&buf);
28863        Self::arbitrary(&mut unstructured).unwrap_or_default()
28864    }
28865}
28866impl Default for SMART_BATTERY_INFO_DATA {
28867    fn default() -> Self {
28868        Self::DEFAULT.clone()
28869    }
28870}
28871impl MessageData for SMART_BATTERY_INFO_DATA {
28872    type Message = MavMessage;
28873    const ID: u32 = 370u32;
28874    const NAME: &'static str = "SMART_BATTERY_INFO";
28875    const EXTRA_CRC: u8 = 75u8;
28876    const ENCODED_LEN: usize = 109usize;
28877    fn deser(
28878        _version: MavlinkVersion,
28879        __input: &[u8],
28880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28881        let avail_len = __input.len();
28882        let mut payload_buf = [0; Self::ENCODED_LEN];
28883        let mut buf = if avail_len < Self::ENCODED_LEN {
28884            payload_buf[0..avail_len].copy_from_slice(__input);
28885            Bytes::new(&payload_buf)
28886        } else {
28887            Bytes::new(__input)
28888        };
28889        let mut __struct = Self::default();
28890        __struct.capacity_full_specification = buf.get_i32_le();
28891        __struct.capacity_full = buf.get_i32_le();
28892        __struct.cycle_count = buf.get_u16_le();
28893        __struct.weight = buf.get_u16_le();
28894        __struct.discharge_minimum_voltage = buf.get_u16_le();
28895        __struct.charging_minimum_voltage = buf.get_u16_le();
28896        __struct.resting_minimum_voltage = buf.get_u16_le();
28897        __struct.id = buf.get_u8();
28898        let tmp = buf.get_u8();
28899        __struct.battery_function =
28900            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28901                enum_type: "MavBatteryFunction",
28902                value: tmp as u32,
28903            })?;
28904        let tmp = buf.get_u8();
28905        __struct.mavtype =
28906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28907                enum_type: "MavBatteryType",
28908                value: tmp as u32,
28909            })?;
28910        for v in &mut __struct.serial_number {
28911            let val = buf.get_u8();
28912            *v = val;
28913        }
28914        for v in &mut __struct.device_name {
28915            let val = buf.get_u8();
28916            *v = val;
28917        }
28918        __struct.charging_maximum_voltage = buf.get_u16_le();
28919        __struct.cells_in_series = buf.get_u8();
28920        __struct.discharge_maximum_current = buf.get_u32_le();
28921        __struct.discharge_maximum_burst_current = buf.get_u32_le();
28922        for v in &mut __struct.manufacture_date {
28923            let val = buf.get_u8();
28924            *v = val;
28925        }
28926        Ok(__struct)
28927    }
28928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28929        let mut __tmp = BytesMut::new(bytes);
28930        #[allow(clippy::absurd_extreme_comparisons)]
28931        #[allow(unused_comparisons)]
28932        if __tmp.remaining() < Self::ENCODED_LEN {
28933            panic!(
28934                "buffer is too small (need {} bytes, but got {})",
28935                Self::ENCODED_LEN,
28936                __tmp.remaining(),
28937            )
28938        }
28939        __tmp.put_i32_le(self.capacity_full_specification);
28940        __tmp.put_i32_le(self.capacity_full);
28941        __tmp.put_u16_le(self.cycle_count);
28942        __tmp.put_u16_le(self.weight);
28943        __tmp.put_u16_le(self.discharge_minimum_voltage);
28944        __tmp.put_u16_le(self.charging_minimum_voltage);
28945        __tmp.put_u16_le(self.resting_minimum_voltage);
28946        __tmp.put_u8(self.id);
28947        __tmp.put_u8(self.battery_function as u8);
28948        __tmp.put_u8(self.mavtype as u8);
28949        for val in &self.serial_number {
28950            __tmp.put_u8(*val);
28951        }
28952        for val in &self.device_name {
28953            __tmp.put_u8(*val);
28954        }
28955        if matches!(version, MavlinkVersion::V2) {
28956            __tmp.put_u16_le(self.charging_maximum_voltage);
28957            __tmp.put_u8(self.cells_in_series);
28958            __tmp.put_u32_le(self.discharge_maximum_current);
28959            __tmp.put_u32_le(self.discharge_maximum_burst_current);
28960            for val in &self.manufacture_date {
28961                __tmp.put_u8(*val);
28962            }
28963            let len = __tmp.len();
28964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28965        } else {
28966            __tmp.len()
28967        }
28968    }
28969}
28970#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28971#[doc = ""]
28972#[doc = "ID: 253"]
28973#[derive(Debug, Clone, PartialEq)]
28974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28976#[cfg_attr(feature = "ts", derive(TS))]
28977#[cfg_attr(feature = "ts", ts(export))]
28978pub struct STATUSTEXT_DATA {
28979    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28980    pub severity: MavSeverity,
28981    #[doc = "Status text message, without null termination character"]
28982    #[cfg_attr(
28983        feature = "serde",
28984        serde(
28985            serialize_with = "crate::nulstr::serialize::<_, 50>",
28986            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
28987        )
28988    )]
28989    #[cfg_attr(feature = "ts", ts(type = "string"))]
28990    pub text: [u8; 50],
28991    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28992    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28993    pub id: u16,
28994    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28995    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28996    pub chunk_seq: u8,
28997}
28998impl STATUSTEXT_DATA {
28999    pub const ENCODED_LEN: usize = 54usize;
29000    pub const DEFAULT: Self = Self {
29001        severity: MavSeverity::DEFAULT,
29002        text: [0_u8; 50usize],
29003        id: 0_u16,
29004        chunk_seq: 0_u8,
29005    };
29006    #[cfg(feature = "arbitrary")]
29007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29008        use arbitrary::{Arbitrary, Unstructured};
29009        let mut buf = [0u8; 1024];
29010        rng.fill_bytes(&mut buf);
29011        let mut unstructured = Unstructured::new(&buf);
29012        Self::arbitrary(&mut unstructured).unwrap_or_default()
29013    }
29014}
29015impl Default for STATUSTEXT_DATA {
29016    fn default() -> Self {
29017        Self::DEFAULT.clone()
29018    }
29019}
29020impl MessageData for STATUSTEXT_DATA {
29021    type Message = MavMessage;
29022    const ID: u32 = 253u32;
29023    const NAME: &'static str = "STATUSTEXT";
29024    const EXTRA_CRC: u8 = 83u8;
29025    const ENCODED_LEN: usize = 54usize;
29026    fn deser(
29027        _version: MavlinkVersion,
29028        __input: &[u8],
29029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29030        let avail_len = __input.len();
29031        let mut payload_buf = [0; Self::ENCODED_LEN];
29032        let mut buf = if avail_len < Self::ENCODED_LEN {
29033            payload_buf[0..avail_len].copy_from_slice(__input);
29034            Bytes::new(&payload_buf)
29035        } else {
29036            Bytes::new(__input)
29037        };
29038        let mut __struct = Self::default();
29039        let tmp = buf.get_u8();
29040        __struct.severity =
29041            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29042                enum_type: "MavSeverity",
29043                value: tmp as u32,
29044            })?;
29045        for v in &mut __struct.text {
29046            let val = buf.get_u8();
29047            *v = val;
29048        }
29049        __struct.id = buf.get_u16_le();
29050        __struct.chunk_seq = buf.get_u8();
29051        Ok(__struct)
29052    }
29053    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29054        let mut __tmp = BytesMut::new(bytes);
29055        #[allow(clippy::absurd_extreme_comparisons)]
29056        #[allow(unused_comparisons)]
29057        if __tmp.remaining() < Self::ENCODED_LEN {
29058            panic!(
29059                "buffer is too small (need {} bytes, but got {})",
29060                Self::ENCODED_LEN,
29061                __tmp.remaining(),
29062            )
29063        }
29064        __tmp.put_u8(self.severity as u8);
29065        for val in &self.text {
29066            __tmp.put_u8(*val);
29067        }
29068        if matches!(version, MavlinkVersion::V2) {
29069            __tmp.put_u16_le(self.id);
29070            __tmp.put_u8(self.chunk_seq);
29071            let len = __tmp.len();
29072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29073        } else {
29074            __tmp.len()
29075        }
29076    }
29077}
29078#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29079#[doc = ""]
29080#[doc = "ID: 261"]
29081#[derive(Debug, Clone, PartialEq)]
29082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29084#[cfg_attr(feature = "ts", derive(TS))]
29085#[cfg_attr(feature = "ts", ts(export))]
29086pub struct STORAGE_INFORMATION_DATA {
29087    #[doc = "Timestamp (time since system boot)."]
29088    pub time_boot_ms: u32,
29089    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29090    pub total_capacity: f32,
29091    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29092    pub used_capacity: f32,
29093    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29094    pub available_capacity: f32,
29095    #[doc = "Read speed."]
29096    pub read_speed: f32,
29097    #[doc = "Write speed."]
29098    pub write_speed: f32,
29099    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29100    pub storage_id: u8,
29101    #[doc = "Number of storage devices"]
29102    pub storage_count: u8,
29103    #[doc = "Status of storage"]
29104    pub status: StorageStatus,
29105    #[doc = "Type of storage"]
29106    #[cfg_attr(feature = "serde", serde(default))]
29107    pub mavtype: StorageType,
29108    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29109    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29110    #[cfg_attr(
29111        feature = "serde",
29112        serde(
29113            serialize_with = "crate::nulstr::serialize::<_, 32>",
29114            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
29115        )
29116    )]
29117    #[cfg_attr(feature = "ts", ts(type = "string"))]
29118    pub name: [u8; 32],
29119    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29120    #[cfg_attr(feature = "serde", serde(default))]
29121    pub storage_usage: StorageUsageFlag,
29122}
29123impl STORAGE_INFORMATION_DATA {
29124    pub const ENCODED_LEN: usize = 61usize;
29125    pub const DEFAULT: Self = Self {
29126        time_boot_ms: 0_u32,
29127        total_capacity: 0.0_f32,
29128        used_capacity: 0.0_f32,
29129        available_capacity: 0.0_f32,
29130        read_speed: 0.0_f32,
29131        write_speed: 0.0_f32,
29132        storage_id: 0_u8,
29133        storage_count: 0_u8,
29134        status: StorageStatus::DEFAULT,
29135        mavtype: StorageType::DEFAULT,
29136        name: [0_u8; 32usize],
29137        storage_usage: StorageUsageFlag::DEFAULT,
29138    };
29139    #[cfg(feature = "arbitrary")]
29140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29141        use arbitrary::{Arbitrary, Unstructured};
29142        let mut buf = [0u8; 1024];
29143        rng.fill_bytes(&mut buf);
29144        let mut unstructured = Unstructured::new(&buf);
29145        Self::arbitrary(&mut unstructured).unwrap_or_default()
29146    }
29147}
29148impl Default for STORAGE_INFORMATION_DATA {
29149    fn default() -> Self {
29150        Self::DEFAULT.clone()
29151    }
29152}
29153impl MessageData for STORAGE_INFORMATION_DATA {
29154    type Message = MavMessage;
29155    const ID: u32 = 261u32;
29156    const NAME: &'static str = "STORAGE_INFORMATION";
29157    const EXTRA_CRC: u8 = 179u8;
29158    const ENCODED_LEN: usize = 61usize;
29159    fn deser(
29160        _version: MavlinkVersion,
29161        __input: &[u8],
29162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29163        let avail_len = __input.len();
29164        let mut payload_buf = [0; Self::ENCODED_LEN];
29165        let mut buf = if avail_len < Self::ENCODED_LEN {
29166            payload_buf[0..avail_len].copy_from_slice(__input);
29167            Bytes::new(&payload_buf)
29168        } else {
29169            Bytes::new(__input)
29170        };
29171        let mut __struct = Self::default();
29172        __struct.time_boot_ms = buf.get_u32_le();
29173        __struct.total_capacity = buf.get_f32_le();
29174        __struct.used_capacity = buf.get_f32_le();
29175        __struct.available_capacity = buf.get_f32_le();
29176        __struct.read_speed = buf.get_f32_le();
29177        __struct.write_speed = buf.get_f32_le();
29178        __struct.storage_id = buf.get_u8();
29179        __struct.storage_count = buf.get_u8();
29180        let tmp = buf.get_u8();
29181        __struct.status =
29182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29183                enum_type: "StorageStatus",
29184                value: tmp as u32,
29185            })?;
29186        let tmp = buf.get_u8();
29187        __struct.mavtype =
29188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29189                enum_type: "StorageType",
29190                value: tmp as u32,
29191            })?;
29192        for v in &mut __struct.name {
29193            let val = buf.get_u8();
29194            *v = val;
29195        }
29196        let tmp = buf.get_u8();
29197        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
29198            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29199                flag_type: "StorageUsageFlag",
29200                value: tmp as u32,
29201            })?;
29202        Ok(__struct)
29203    }
29204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29205        let mut __tmp = BytesMut::new(bytes);
29206        #[allow(clippy::absurd_extreme_comparisons)]
29207        #[allow(unused_comparisons)]
29208        if __tmp.remaining() < Self::ENCODED_LEN {
29209            panic!(
29210                "buffer is too small (need {} bytes, but got {})",
29211                Self::ENCODED_LEN,
29212                __tmp.remaining(),
29213            )
29214        }
29215        __tmp.put_u32_le(self.time_boot_ms);
29216        __tmp.put_f32_le(self.total_capacity);
29217        __tmp.put_f32_le(self.used_capacity);
29218        __tmp.put_f32_le(self.available_capacity);
29219        __tmp.put_f32_le(self.read_speed);
29220        __tmp.put_f32_le(self.write_speed);
29221        __tmp.put_u8(self.storage_id);
29222        __tmp.put_u8(self.storage_count);
29223        __tmp.put_u8(self.status as u8);
29224        if matches!(version, MavlinkVersion::V2) {
29225            __tmp.put_u8(self.mavtype as u8);
29226            for val in &self.name {
29227                __tmp.put_u8(*val);
29228            }
29229            __tmp.put_u8(self.storage_usage.bits());
29230            let len = __tmp.len();
29231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29232        } else {
29233            __tmp.len()
29234        }
29235    }
29236}
29237#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29238#[doc = ""]
29239#[doc = "ID: 401"]
29240#[derive(Debug, Clone, PartialEq)]
29241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29243#[cfg_attr(feature = "ts", derive(TS))]
29244#[cfg_attr(feature = "ts", ts(export))]
29245pub struct SUPPORTED_TUNES_DATA {
29246    #[doc = "Bitfield of supported tune formats."]
29247    pub format: TuneFormat,
29248    #[doc = "System ID"]
29249    pub target_system: u8,
29250    #[doc = "Component ID"]
29251    pub target_component: u8,
29252}
29253impl SUPPORTED_TUNES_DATA {
29254    pub const ENCODED_LEN: usize = 6usize;
29255    pub const DEFAULT: Self = Self {
29256        format: TuneFormat::DEFAULT,
29257        target_system: 0_u8,
29258        target_component: 0_u8,
29259    };
29260    #[cfg(feature = "arbitrary")]
29261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29262        use arbitrary::{Arbitrary, Unstructured};
29263        let mut buf = [0u8; 1024];
29264        rng.fill_bytes(&mut buf);
29265        let mut unstructured = Unstructured::new(&buf);
29266        Self::arbitrary(&mut unstructured).unwrap_or_default()
29267    }
29268}
29269impl Default for SUPPORTED_TUNES_DATA {
29270    fn default() -> Self {
29271        Self::DEFAULT.clone()
29272    }
29273}
29274impl MessageData for SUPPORTED_TUNES_DATA {
29275    type Message = MavMessage;
29276    const ID: u32 = 401u32;
29277    const NAME: &'static str = "SUPPORTED_TUNES";
29278    const EXTRA_CRC: u8 = 183u8;
29279    const ENCODED_LEN: usize = 6usize;
29280    fn deser(
29281        _version: MavlinkVersion,
29282        __input: &[u8],
29283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29284        let avail_len = __input.len();
29285        let mut payload_buf = [0; Self::ENCODED_LEN];
29286        let mut buf = if avail_len < Self::ENCODED_LEN {
29287            payload_buf[0..avail_len].copy_from_slice(__input);
29288            Bytes::new(&payload_buf)
29289        } else {
29290            Bytes::new(__input)
29291        };
29292        let mut __struct = Self::default();
29293        let tmp = buf.get_u32_le();
29294        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29295            ::mavlink_core::error::ParserError::InvalidEnum {
29296                enum_type: "TuneFormat",
29297                value: tmp as u32,
29298            },
29299        )?;
29300        __struct.target_system = buf.get_u8();
29301        __struct.target_component = buf.get_u8();
29302        Ok(__struct)
29303    }
29304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29305        let mut __tmp = BytesMut::new(bytes);
29306        #[allow(clippy::absurd_extreme_comparisons)]
29307        #[allow(unused_comparisons)]
29308        if __tmp.remaining() < Self::ENCODED_LEN {
29309            panic!(
29310                "buffer is too small (need {} bytes, but got {})",
29311                Self::ENCODED_LEN,
29312                __tmp.remaining(),
29313            )
29314        }
29315        __tmp.put_u32_le(self.format as u32);
29316        __tmp.put_u8(self.target_system);
29317        __tmp.put_u8(self.target_component);
29318        if matches!(version, MavlinkVersion::V2) {
29319            let len = __tmp.len();
29320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29321        } else {
29322            __tmp.len()
29323        }
29324    }
29325}
29326#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29327#[doc = ""]
29328#[doc = "ID: 2"]
29329#[derive(Debug, Clone, PartialEq)]
29330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29332#[cfg_attr(feature = "ts", derive(TS))]
29333#[cfg_attr(feature = "ts", ts(export))]
29334pub struct SYSTEM_TIME_DATA {
29335    #[doc = "Timestamp (UNIX epoch time)."]
29336    pub time_unix_usec: u64,
29337    #[doc = "Timestamp (time since system boot)."]
29338    pub time_boot_ms: u32,
29339}
29340impl SYSTEM_TIME_DATA {
29341    pub const ENCODED_LEN: usize = 12usize;
29342    pub const DEFAULT: Self = Self {
29343        time_unix_usec: 0_u64,
29344        time_boot_ms: 0_u32,
29345    };
29346    #[cfg(feature = "arbitrary")]
29347    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29348        use arbitrary::{Arbitrary, Unstructured};
29349        let mut buf = [0u8; 1024];
29350        rng.fill_bytes(&mut buf);
29351        let mut unstructured = Unstructured::new(&buf);
29352        Self::arbitrary(&mut unstructured).unwrap_or_default()
29353    }
29354}
29355impl Default for SYSTEM_TIME_DATA {
29356    fn default() -> Self {
29357        Self::DEFAULT.clone()
29358    }
29359}
29360impl MessageData for SYSTEM_TIME_DATA {
29361    type Message = MavMessage;
29362    const ID: u32 = 2u32;
29363    const NAME: &'static str = "SYSTEM_TIME";
29364    const EXTRA_CRC: u8 = 137u8;
29365    const ENCODED_LEN: usize = 12usize;
29366    fn deser(
29367        _version: MavlinkVersion,
29368        __input: &[u8],
29369    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29370        let avail_len = __input.len();
29371        let mut payload_buf = [0; Self::ENCODED_LEN];
29372        let mut buf = if avail_len < Self::ENCODED_LEN {
29373            payload_buf[0..avail_len].copy_from_slice(__input);
29374            Bytes::new(&payload_buf)
29375        } else {
29376            Bytes::new(__input)
29377        };
29378        let mut __struct = Self::default();
29379        __struct.time_unix_usec = buf.get_u64_le();
29380        __struct.time_boot_ms = buf.get_u32_le();
29381        Ok(__struct)
29382    }
29383    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29384        let mut __tmp = BytesMut::new(bytes);
29385        #[allow(clippy::absurd_extreme_comparisons)]
29386        #[allow(unused_comparisons)]
29387        if __tmp.remaining() < Self::ENCODED_LEN {
29388            panic!(
29389                "buffer is too small (need {} bytes, but got {})",
29390                Self::ENCODED_LEN,
29391                __tmp.remaining(),
29392            )
29393        }
29394        __tmp.put_u64_le(self.time_unix_usec);
29395        __tmp.put_u32_le(self.time_boot_ms);
29396        if matches!(version, MavlinkVersion::V2) {
29397            let len = __tmp.len();
29398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29399        } else {
29400            __tmp.len()
29401        }
29402    }
29403}
29404#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29405#[doc = ""]
29406#[doc = "ID: 1"]
29407#[derive(Debug, Clone, PartialEq)]
29408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29410#[cfg_attr(feature = "ts", derive(TS))]
29411#[cfg_attr(feature = "ts", ts(export))]
29412pub struct SYS_STATUS_DATA {
29413    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29414    pub onboard_control_sensors_present: MavSysStatusSensor,
29415    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29416    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29417    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29418    pub onboard_control_sensors_health: MavSysStatusSensor,
29419    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29420    pub load: u16,
29421    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29422    pub voltage_battery: u16,
29423    #[doc = "Battery current, -1: Current not sent by autopilot"]
29424    pub current_battery: i16,
29425    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29426    pub drop_rate_comm: u16,
29427    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29428    pub errors_comm: u16,
29429    #[doc = "Autopilot-specific errors"]
29430    pub errors_count1: u16,
29431    #[doc = "Autopilot-specific errors"]
29432    pub errors_count2: u16,
29433    #[doc = "Autopilot-specific errors"]
29434    pub errors_count3: u16,
29435    #[doc = "Autopilot-specific errors"]
29436    pub errors_count4: u16,
29437    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29438    pub battery_remaining: i8,
29439    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29440    #[cfg_attr(feature = "serde", serde(default))]
29441    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29442    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29443    #[cfg_attr(feature = "serde", serde(default))]
29444    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29445    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29446    #[cfg_attr(feature = "serde", serde(default))]
29447    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29448}
29449impl SYS_STATUS_DATA {
29450    pub const ENCODED_LEN: usize = 43usize;
29451    pub const DEFAULT: Self = Self {
29452        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29453        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29454        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29455        load: 0_u16,
29456        voltage_battery: 0_u16,
29457        current_battery: 0_i16,
29458        drop_rate_comm: 0_u16,
29459        errors_comm: 0_u16,
29460        errors_count1: 0_u16,
29461        errors_count2: 0_u16,
29462        errors_count3: 0_u16,
29463        errors_count4: 0_u16,
29464        battery_remaining: 0_i8,
29465        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29466        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29467        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29468    };
29469    #[cfg(feature = "arbitrary")]
29470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29471        use arbitrary::{Arbitrary, Unstructured};
29472        let mut buf = [0u8; 1024];
29473        rng.fill_bytes(&mut buf);
29474        let mut unstructured = Unstructured::new(&buf);
29475        Self::arbitrary(&mut unstructured).unwrap_or_default()
29476    }
29477}
29478impl Default for SYS_STATUS_DATA {
29479    fn default() -> Self {
29480        Self::DEFAULT.clone()
29481    }
29482}
29483impl MessageData for SYS_STATUS_DATA {
29484    type Message = MavMessage;
29485    const ID: u32 = 1u32;
29486    const NAME: &'static str = "SYS_STATUS";
29487    const EXTRA_CRC: u8 = 124u8;
29488    const ENCODED_LEN: usize = 43usize;
29489    fn deser(
29490        _version: MavlinkVersion,
29491        __input: &[u8],
29492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29493        let avail_len = __input.len();
29494        let mut payload_buf = [0; Self::ENCODED_LEN];
29495        let mut buf = if avail_len < Self::ENCODED_LEN {
29496            payload_buf[0..avail_len].copy_from_slice(__input);
29497            Bytes::new(&payload_buf)
29498        } else {
29499            Bytes::new(__input)
29500        };
29501        let mut __struct = Self::default();
29502        let tmp = buf.get_u32_le();
29503        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29504            tmp & MavSysStatusSensor::all().bits(),
29505        )
29506        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29507            flag_type: "MavSysStatusSensor",
29508            value: tmp as u32,
29509        })?;
29510        let tmp = buf.get_u32_le();
29511        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29512            tmp & MavSysStatusSensor::all().bits(),
29513        )
29514        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29515            flag_type: "MavSysStatusSensor",
29516            value: tmp as u32,
29517        })?;
29518        let tmp = buf.get_u32_le();
29519        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29520            tmp & MavSysStatusSensor::all().bits(),
29521        )
29522        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29523            flag_type: "MavSysStatusSensor",
29524            value: tmp as u32,
29525        })?;
29526        __struct.load = buf.get_u16_le();
29527        __struct.voltage_battery = buf.get_u16_le();
29528        __struct.current_battery = buf.get_i16_le();
29529        __struct.drop_rate_comm = buf.get_u16_le();
29530        __struct.errors_comm = buf.get_u16_le();
29531        __struct.errors_count1 = buf.get_u16_le();
29532        __struct.errors_count2 = buf.get_u16_le();
29533        __struct.errors_count3 = buf.get_u16_le();
29534        __struct.errors_count4 = buf.get_u16_le();
29535        __struct.battery_remaining = buf.get_i8();
29536        let tmp = buf.get_u32_le();
29537        __struct.onboard_control_sensors_present_extended =
29538            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29539                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29540                flag_type: "MavSysStatusSensorExtended",
29541                value: tmp as u32,
29542            })?;
29543        let tmp = buf.get_u32_le();
29544        __struct.onboard_control_sensors_enabled_extended =
29545            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29546                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29547                flag_type: "MavSysStatusSensorExtended",
29548                value: tmp as u32,
29549            })?;
29550        let tmp = buf.get_u32_le();
29551        __struct.onboard_control_sensors_health_extended =
29552            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29553                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29554                flag_type: "MavSysStatusSensorExtended",
29555                value: tmp as u32,
29556            })?;
29557        Ok(__struct)
29558    }
29559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29560        let mut __tmp = BytesMut::new(bytes);
29561        #[allow(clippy::absurd_extreme_comparisons)]
29562        #[allow(unused_comparisons)]
29563        if __tmp.remaining() < Self::ENCODED_LEN {
29564            panic!(
29565                "buffer is too small (need {} bytes, but got {})",
29566                Self::ENCODED_LEN,
29567                __tmp.remaining(),
29568            )
29569        }
29570        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29571        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29572        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29573        __tmp.put_u16_le(self.load);
29574        __tmp.put_u16_le(self.voltage_battery);
29575        __tmp.put_i16_le(self.current_battery);
29576        __tmp.put_u16_le(self.drop_rate_comm);
29577        __tmp.put_u16_le(self.errors_comm);
29578        __tmp.put_u16_le(self.errors_count1);
29579        __tmp.put_u16_le(self.errors_count2);
29580        __tmp.put_u16_le(self.errors_count3);
29581        __tmp.put_u16_le(self.errors_count4);
29582        __tmp.put_i8(self.battery_remaining);
29583        if matches!(version, MavlinkVersion::V2) {
29584            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29585            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29586            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29587            let len = __tmp.len();
29588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29589        } else {
29590            __tmp.len()
29591        }
29592    }
29593}
29594#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29595#[doc = ""]
29596#[doc = "ID: 135"]
29597#[derive(Debug, Clone, PartialEq)]
29598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29600#[cfg_attr(feature = "ts", derive(TS))]
29601#[cfg_attr(feature = "ts", ts(export))]
29602pub struct TERRAIN_CHECK_DATA {
29603    #[doc = "Latitude"]
29604    pub lat: i32,
29605    #[doc = "Longitude"]
29606    pub lon: i32,
29607}
29608impl TERRAIN_CHECK_DATA {
29609    pub const ENCODED_LEN: usize = 8usize;
29610    pub const DEFAULT: Self = Self {
29611        lat: 0_i32,
29612        lon: 0_i32,
29613    };
29614    #[cfg(feature = "arbitrary")]
29615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29616        use arbitrary::{Arbitrary, Unstructured};
29617        let mut buf = [0u8; 1024];
29618        rng.fill_bytes(&mut buf);
29619        let mut unstructured = Unstructured::new(&buf);
29620        Self::arbitrary(&mut unstructured).unwrap_or_default()
29621    }
29622}
29623impl Default for TERRAIN_CHECK_DATA {
29624    fn default() -> Self {
29625        Self::DEFAULT.clone()
29626    }
29627}
29628impl MessageData for TERRAIN_CHECK_DATA {
29629    type Message = MavMessage;
29630    const ID: u32 = 135u32;
29631    const NAME: &'static str = "TERRAIN_CHECK";
29632    const EXTRA_CRC: u8 = 203u8;
29633    const ENCODED_LEN: usize = 8usize;
29634    fn deser(
29635        _version: MavlinkVersion,
29636        __input: &[u8],
29637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29638        let avail_len = __input.len();
29639        let mut payload_buf = [0; Self::ENCODED_LEN];
29640        let mut buf = if avail_len < Self::ENCODED_LEN {
29641            payload_buf[0..avail_len].copy_from_slice(__input);
29642            Bytes::new(&payload_buf)
29643        } else {
29644            Bytes::new(__input)
29645        };
29646        let mut __struct = Self::default();
29647        __struct.lat = buf.get_i32_le();
29648        __struct.lon = buf.get_i32_le();
29649        Ok(__struct)
29650    }
29651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29652        let mut __tmp = BytesMut::new(bytes);
29653        #[allow(clippy::absurd_extreme_comparisons)]
29654        #[allow(unused_comparisons)]
29655        if __tmp.remaining() < Self::ENCODED_LEN {
29656            panic!(
29657                "buffer is too small (need {} bytes, but got {})",
29658                Self::ENCODED_LEN,
29659                __tmp.remaining(),
29660            )
29661        }
29662        __tmp.put_i32_le(self.lat);
29663        __tmp.put_i32_le(self.lon);
29664        if matches!(version, MavlinkVersion::V2) {
29665            let len = __tmp.len();
29666            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29667        } else {
29668            __tmp.len()
29669        }
29670    }
29671}
29672#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29673#[doc = ""]
29674#[doc = "ID: 134"]
29675#[derive(Debug, Clone, PartialEq)]
29676#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29678#[cfg_attr(feature = "ts", derive(TS))]
29679#[cfg_attr(feature = "ts", ts(export))]
29680pub struct TERRAIN_DATA_DATA {
29681    #[doc = "Latitude of SW corner of first grid"]
29682    pub lat: i32,
29683    #[doc = "Longitude of SW corner of first grid"]
29684    pub lon: i32,
29685    #[doc = "Grid spacing"]
29686    pub grid_spacing: u16,
29687    #[doc = "Terrain data MSL"]
29688    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29689    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29690    pub data: [i16; 16],
29691    #[doc = "bit within the terrain request mask"]
29692    pub gridbit: u8,
29693}
29694impl TERRAIN_DATA_DATA {
29695    pub const ENCODED_LEN: usize = 43usize;
29696    pub const DEFAULT: Self = Self {
29697        lat: 0_i32,
29698        lon: 0_i32,
29699        grid_spacing: 0_u16,
29700        data: [0_i16; 16usize],
29701        gridbit: 0_u8,
29702    };
29703    #[cfg(feature = "arbitrary")]
29704    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29705        use arbitrary::{Arbitrary, Unstructured};
29706        let mut buf = [0u8; 1024];
29707        rng.fill_bytes(&mut buf);
29708        let mut unstructured = Unstructured::new(&buf);
29709        Self::arbitrary(&mut unstructured).unwrap_or_default()
29710    }
29711}
29712impl Default for TERRAIN_DATA_DATA {
29713    fn default() -> Self {
29714        Self::DEFAULT.clone()
29715    }
29716}
29717impl MessageData for TERRAIN_DATA_DATA {
29718    type Message = MavMessage;
29719    const ID: u32 = 134u32;
29720    const NAME: &'static str = "TERRAIN_DATA";
29721    const EXTRA_CRC: u8 = 229u8;
29722    const ENCODED_LEN: usize = 43usize;
29723    fn deser(
29724        _version: MavlinkVersion,
29725        __input: &[u8],
29726    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29727        let avail_len = __input.len();
29728        let mut payload_buf = [0; Self::ENCODED_LEN];
29729        let mut buf = if avail_len < Self::ENCODED_LEN {
29730            payload_buf[0..avail_len].copy_from_slice(__input);
29731            Bytes::new(&payload_buf)
29732        } else {
29733            Bytes::new(__input)
29734        };
29735        let mut __struct = Self::default();
29736        __struct.lat = buf.get_i32_le();
29737        __struct.lon = buf.get_i32_le();
29738        __struct.grid_spacing = buf.get_u16_le();
29739        for v in &mut __struct.data {
29740            let val = buf.get_i16_le();
29741            *v = val;
29742        }
29743        __struct.gridbit = buf.get_u8();
29744        Ok(__struct)
29745    }
29746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29747        let mut __tmp = BytesMut::new(bytes);
29748        #[allow(clippy::absurd_extreme_comparisons)]
29749        #[allow(unused_comparisons)]
29750        if __tmp.remaining() < Self::ENCODED_LEN {
29751            panic!(
29752                "buffer is too small (need {} bytes, but got {})",
29753                Self::ENCODED_LEN,
29754                __tmp.remaining(),
29755            )
29756        }
29757        __tmp.put_i32_le(self.lat);
29758        __tmp.put_i32_le(self.lon);
29759        __tmp.put_u16_le(self.grid_spacing);
29760        for val in &self.data {
29761            __tmp.put_i16_le(*val);
29762        }
29763        __tmp.put_u8(self.gridbit);
29764        if matches!(version, MavlinkVersion::V2) {
29765            let len = __tmp.len();
29766            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29767        } else {
29768            __tmp.len()
29769        }
29770    }
29771}
29772#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29773#[doc = ""]
29774#[doc = "ID: 136"]
29775#[derive(Debug, Clone, PartialEq)]
29776#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29777#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29778#[cfg_attr(feature = "ts", derive(TS))]
29779#[cfg_attr(feature = "ts", ts(export))]
29780pub struct TERRAIN_REPORT_DATA {
29781    #[doc = "Latitude"]
29782    pub lat: i32,
29783    #[doc = "Longitude"]
29784    pub lon: i32,
29785    #[doc = "Terrain height MSL"]
29786    pub terrain_height: f32,
29787    #[doc = "Current vehicle height above lat/lon terrain height"]
29788    pub current_height: f32,
29789    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29790    pub spacing: u16,
29791    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29792    pub pending: u16,
29793    #[doc = "Number of 4x4 terrain blocks in memory"]
29794    pub loaded: u16,
29795}
29796impl TERRAIN_REPORT_DATA {
29797    pub const ENCODED_LEN: usize = 22usize;
29798    pub const DEFAULT: Self = Self {
29799        lat: 0_i32,
29800        lon: 0_i32,
29801        terrain_height: 0.0_f32,
29802        current_height: 0.0_f32,
29803        spacing: 0_u16,
29804        pending: 0_u16,
29805        loaded: 0_u16,
29806    };
29807    #[cfg(feature = "arbitrary")]
29808    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29809        use arbitrary::{Arbitrary, Unstructured};
29810        let mut buf = [0u8; 1024];
29811        rng.fill_bytes(&mut buf);
29812        let mut unstructured = Unstructured::new(&buf);
29813        Self::arbitrary(&mut unstructured).unwrap_or_default()
29814    }
29815}
29816impl Default for TERRAIN_REPORT_DATA {
29817    fn default() -> Self {
29818        Self::DEFAULT.clone()
29819    }
29820}
29821impl MessageData for TERRAIN_REPORT_DATA {
29822    type Message = MavMessage;
29823    const ID: u32 = 136u32;
29824    const NAME: &'static str = "TERRAIN_REPORT";
29825    const EXTRA_CRC: u8 = 1u8;
29826    const ENCODED_LEN: usize = 22usize;
29827    fn deser(
29828        _version: MavlinkVersion,
29829        __input: &[u8],
29830    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29831        let avail_len = __input.len();
29832        let mut payload_buf = [0; Self::ENCODED_LEN];
29833        let mut buf = if avail_len < Self::ENCODED_LEN {
29834            payload_buf[0..avail_len].copy_from_slice(__input);
29835            Bytes::new(&payload_buf)
29836        } else {
29837            Bytes::new(__input)
29838        };
29839        let mut __struct = Self::default();
29840        __struct.lat = buf.get_i32_le();
29841        __struct.lon = buf.get_i32_le();
29842        __struct.terrain_height = buf.get_f32_le();
29843        __struct.current_height = buf.get_f32_le();
29844        __struct.spacing = buf.get_u16_le();
29845        __struct.pending = buf.get_u16_le();
29846        __struct.loaded = buf.get_u16_le();
29847        Ok(__struct)
29848    }
29849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29850        let mut __tmp = BytesMut::new(bytes);
29851        #[allow(clippy::absurd_extreme_comparisons)]
29852        #[allow(unused_comparisons)]
29853        if __tmp.remaining() < Self::ENCODED_LEN {
29854            panic!(
29855                "buffer is too small (need {} bytes, but got {})",
29856                Self::ENCODED_LEN,
29857                __tmp.remaining(),
29858            )
29859        }
29860        __tmp.put_i32_le(self.lat);
29861        __tmp.put_i32_le(self.lon);
29862        __tmp.put_f32_le(self.terrain_height);
29863        __tmp.put_f32_le(self.current_height);
29864        __tmp.put_u16_le(self.spacing);
29865        __tmp.put_u16_le(self.pending);
29866        __tmp.put_u16_le(self.loaded);
29867        if matches!(version, MavlinkVersion::V2) {
29868            let len = __tmp.len();
29869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29870        } else {
29871            __tmp.len()
29872        }
29873    }
29874}
29875#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29876#[doc = ""]
29877#[doc = "ID: 133"]
29878#[derive(Debug, Clone, PartialEq)]
29879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29881#[cfg_attr(feature = "ts", derive(TS))]
29882#[cfg_attr(feature = "ts", ts(export))]
29883pub struct TERRAIN_REQUEST_DATA {
29884    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29885    pub mask: u64,
29886    #[doc = "Latitude of SW corner of first grid"]
29887    pub lat: i32,
29888    #[doc = "Longitude of SW corner of first grid"]
29889    pub lon: i32,
29890    #[doc = "Grid spacing"]
29891    pub grid_spacing: u16,
29892}
29893impl TERRAIN_REQUEST_DATA {
29894    pub const ENCODED_LEN: usize = 18usize;
29895    pub const DEFAULT: Self = Self {
29896        mask: 0_u64,
29897        lat: 0_i32,
29898        lon: 0_i32,
29899        grid_spacing: 0_u16,
29900    };
29901    #[cfg(feature = "arbitrary")]
29902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29903        use arbitrary::{Arbitrary, Unstructured};
29904        let mut buf = [0u8; 1024];
29905        rng.fill_bytes(&mut buf);
29906        let mut unstructured = Unstructured::new(&buf);
29907        Self::arbitrary(&mut unstructured).unwrap_or_default()
29908    }
29909}
29910impl Default for TERRAIN_REQUEST_DATA {
29911    fn default() -> Self {
29912        Self::DEFAULT.clone()
29913    }
29914}
29915impl MessageData for TERRAIN_REQUEST_DATA {
29916    type Message = MavMessage;
29917    const ID: u32 = 133u32;
29918    const NAME: &'static str = "TERRAIN_REQUEST";
29919    const EXTRA_CRC: u8 = 6u8;
29920    const ENCODED_LEN: usize = 18usize;
29921    fn deser(
29922        _version: MavlinkVersion,
29923        __input: &[u8],
29924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29925        let avail_len = __input.len();
29926        let mut payload_buf = [0; Self::ENCODED_LEN];
29927        let mut buf = if avail_len < Self::ENCODED_LEN {
29928            payload_buf[0..avail_len].copy_from_slice(__input);
29929            Bytes::new(&payload_buf)
29930        } else {
29931            Bytes::new(__input)
29932        };
29933        let mut __struct = Self::default();
29934        __struct.mask = buf.get_u64_le();
29935        __struct.lat = buf.get_i32_le();
29936        __struct.lon = buf.get_i32_le();
29937        __struct.grid_spacing = buf.get_u16_le();
29938        Ok(__struct)
29939    }
29940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29941        let mut __tmp = BytesMut::new(bytes);
29942        #[allow(clippy::absurd_extreme_comparisons)]
29943        #[allow(unused_comparisons)]
29944        if __tmp.remaining() < Self::ENCODED_LEN {
29945            panic!(
29946                "buffer is too small (need {} bytes, but got {})",
29947                Self::ENCODED_LEN,
29948                __tmp.remaining(),
29949            )
29950        }
29951        __tmp.put_u64_le(self.mask);
29952        __tmp.put_i32_le(self.lat);
29953        __tmp.put_i32_le(self.lon);
29954        __tmp.put_u16_le(self.grid_spacing);
29955        if matches!(version, MavlinkVersion::V2) {
29956            let len = __tmp.len();
29957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29958        } else {
29959            __tmp.len()
29960        }
29961    }
29962}
29963#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29964#[doc = ""]
29965#[doc = "ID: 111"]
29966#[derive(Debug, Clone, PartialEq)]
29967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29969#[cfg_attr(feature = "ts", derive(TS))]
29970#[cfg_attr(feature = "ts", ts(export))]
29971pub struct TIMESYNC_DATA {
29972    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29973    pub tc1: i64,
29974    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29975    pub ts1: i64,
29976    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29977    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29978    pub target_system: u8,
29979    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29981    pub target_component: u8,
29982}
29983impl TIMESYNC_DATA {
29984    pub const ENCODED_LEN: usize = 18usize;
29985    pub const DEFAULT: Self = Self {
29986        tc1: 0_i64,
29987        ts1: 0_i64,
29988        target_system: 0_u8,
29989        target_component: 0_u8,
29990    };
29991    #[cfg(feature = "arbitrary")]
29992    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29993        use arbitrary::{Arbitrary, Unstructured};
29994        let mut buf = [0u8; 1024];
29995        rng.fill_bytes(&mut buf);
29996        let mut unstructured = Unstructured::new(&buf);
29997        Self::arbitrary(&mut unstructured).unwrap_or_default()
29998    }
29999}
30000impl Default for TIMESYNC_DATA {
30001    fn default() -> Self {
30002        Self::DEFAULT.clone()
30003    }
30004}
30005impl MessageData for TIMESYNC_DATA {
30006    type Message = MavMessage;
30007    const ID: u32 = 111u32;
30008    const NAME: &'static str = "TIMESYNC";
30009    const EXTRA_CRC: u8 = 34u8;
30010    const ENCODED_LEN: usize = 18usize;
30011    fn deser(
30012        _version: MavlinkVersion,
30013        __input: &[u8],
30014    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30015        let avail_len = __input.len();
30016        let mut payload_buf = [0; Self::ENCODED_LEN];
30017        let mut buf = if avail_len < Self::ENCODED_LEN {
30018            payload_buf[0..avail_len].copy_from_slice(__input);
30019            Bytes::new(&payload_buf)
30020        } else {
30021            Bytes::new(__input)
30022        };
30023        let mut __struct = Self::default();
30024        __struct.tc1 = buf.get_i64_le();
30025        __struct.ts1 = buf.get_i64_le();
30026        __struct.target_system = buf.get_u8();
30027        __struct.target_component = buf.get_u8();
30028        Ok(__struct)
30029    }
30030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30031        let mut __tmp = BytesMut::new(bytes);
30032        #[allow(clippy::absurd_extreme_comparisons)]
30033        #[allow(unused_comparisons)]
30034        if __tmp.remaining() < Self::ENCODED_LEN {
30035            panic!(
30036                "buffer is too small (need {} bytes, but got {})",
30037                Self::ENCODED_LEN,
30038                __tmp.remaining(),
30039            )
30040        }
30041        __tmp.put_i64_le(self.tc1);
30042        __tmp.put_i64_le(self.ts1);
30043        if matches!(version, MavlinkVersion::V2) {
30044            __tmp.put_u8(self.target_system);
30045            __tmp.put_u8(self.target_component);
30046            let len = __tmp.len();
30047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30048        } else {
30049            __tmp.len()
30050        }
30051    }
30052}
30053#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30054#[doc = ""]
30055#[doc = "ID: 380"]
30056#[derive(Debug, Clone, PartialEq)]
30057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30059#[cfg_attr(feature = "ts", derive(TS))]
30060#[cfg_attr(feature = "ts", ts(export))]
30061pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30062    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30063    pub safe_return: i32,
30064    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30065    pub land: i32,
30066    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30067    pub mission_next_item: i32,
30068    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30069    pub mission_end: i32,
30070    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30071    pub commanded_action: i32,
30072}
30073impl TIME_ESTIMATE_TO_TARGET_DATA {
30074    pub const ENCODED_LEN: usize = 20usize;
30075    pub const DEFAULT: Self = Self {
30076        safe_return: 0_i32,
30077        land: 0_i32,
30078        mission_next_item: 0_i32,
30079        mission_end: 0_i32,
30080        commanded_action: 0_i32,
30081    };
30082    #[cfg(feature = "arbitrary")]
30083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30084        use arbitrary::{Arbitrary, Unstructured};
30085        let mut buf = [0u8; 1024];
30086        rng.fill_bytes(&mut buf);
30087        let mut unstructured = Unstructured::new(&buf);
30088        Self::arbitrary(&mut unstructured).unwrap_or_default()
30089    }
30090}
30091impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30092    fn default() -> Self {
30093        Self::DEFAULT.clone()
30094    }
30095}
30096impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30097    type Message = MavMessage;
30098    const ID: u32 = 380u32;
30099    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30100    const EXTRA_CRC: u8 = 232u8;
30101    const ENCODED_LEN: usize = 20usize;
30102    fn deser(
30103        _version: MavlinkVersion,
30104        __input: &[u8],
30105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30106        let avail_len = __input.len();
30107        let mut payload_buf = [0; Self::ENCODED_LEN];
30108        let mut buf = if avail_len < Self::ENCODED_LEN {
30109            payload_buf[0..avail_len].copy_from_slice(__input);
30110            Bytes::new(&payload_buf)
30111        } else {
30112            Bytes::new(__input)
30113        };
30114        let mut __struct = Self::default();
30115        __struct.safe_return = buf.get_i32_le();
30116        __struct.land = buf.get_i32_le();
30117        __struct.mission_next_item = buf.get_i32_le();
30118        __struct.mission_end = buf.get_i32_le();
30119        __struct.commanded_action = buf.get_i32_le();
30120        Ok(__struct)
30121    }
30122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30123        let mut __tmp = BytesMut::new(bytes);
30124        #[allow(clippy::absurd_extreme_comparisons)]
30125        #[allow(unused_comparisons)]
30126        if __tmp.remaining() < Self::ENCODED_LEN {
30127            panic!(
30128                "buffer is too small (need {} bytes, but got {})",
30129                Self::ENCODED_LEN,
30130                __tmp.remaining(),
30131            )
30132        }
30133        __tmp.put_i32_le(self.safe_return);
30134        __tmp.put_i32_le(self.land);
30135        __tmp.put_i32_le(self.mission_next_item);
30136        __tmp.put_i32_le(self.mission_end);
30137        __tmp.put_i32_le(self.commanded_action);
30138        if matches!(version, MavlinkVersion::V2) {
30139            let len = __tmp.len();
30140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30141        } else {
30142            __tmp.len()
30143        }
30144    }
30145}
30146#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30147#[doc = ""]
30148#[doc = "ID: 333"]
30149#[derive(Debug, Clone, PartialEq)]
30150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30152#[cfg_attr(feature = "ts", derive(TS))]
30153#[cfg_attr(feature = "ts", ts(export))]
30154pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30155    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30156    pub time_usec: u64,
30157    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30158    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30159    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30160    pub pos_x: [f32; 5],
30161    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30162    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30163    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30164    pub pos_y: [f32; 5],
30165    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30168    pub pos_z: [f32; 5],
30169    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30171    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30172    pub delta: [f32; 5],
30173    #[doc = "Yaw. Set to NaN for unchanged"]
30174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30175    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30176    pub pos_yaw: [f32; 5],
30177    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30178    pub valid_points: u8,
30179}
30180impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30181    pub const ENCODED_LEN: usize = 109usize;
30182    pub const DEFAULT: Self = Self {
30183        time_usec: 0_u64,
30184        pos_x: [0.0_f32; 5usize],
30185        pos_y: [0.0_f32; 5usize],
30186        pos_z: [0.0_f32; 5usize],
30187        delta: [0.0_f32; 5usize],
30188        pos_yaw: [0.0_f32; 5usize],
30189        valid_points: 0_u8,
30190    };
30191    #[cfg(feature = "arbitrary")]
30192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30193        use arbitrary::{Arbitrary, Unstructured};
30194        let mut buf = [0u8; 1024];
30195        rng.fill_bytes(&mut buf);
30196        let mut unstructured = Unstructured::new(&buf);
30197        Self::arbitrary(&mut unstructured).unwrap_or_default()
30198    }
30199}
30200impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30201    fn default() -> Self {
30202        Self::DEFAULT.clone()
30203    }
30204}
30205impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30206    type Message = MavMessage;
30207    const ID: u32 = 333u32;
30208    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30209    const EXTRA_CRC: u8 = 231u8;
30210    const ENCODED_LEN: usize = 109usize;
30211    fn deser(
30212        _version: MavlinkVersion,
30213        __input: &[u8],
30214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30215        let avail_len = __input.len();
30216        let mut payload_buf = [0; Self::ENCODED_LEN];
30217        let mut buf = if avail_len < Self::ENCODED_LEN {
30218            payload_buf[0..avail_len].copy_from_slice(__input);
30219            Bytes::new(&payload_buf)
30220        } else {
30221            Bytes::new(__input)
30222        };
30223        let mut __struct = Self::default();
30224        __struct.time_usec = buf.get_u64_le();
30225        for v in &mut __struct.pos_x {
30226            let val = buf.get_f32_le();
30227            *v = val;
30228        }
30229        for v in &mut __struct.pos_y {
30230            let val = buf.get_f32_le();
30231            *v = val;
30232        }
30233        for v in &mut __struct.pos_z {
30234            let val = buf.get_f32_le();
30235            *v = val;
30236        }
30237        for v in &mut __struct.delta {
30238            let val = buf.get_f32_le();
30239            *v = val;
30240        }
30241        for v in &mut __struct.pos_yaw {
30242            let val = buf.get_f32_le();
30243            *v = val;
30244        }
30245        __struct.valid_points = buf.get_u8();
30246        Ok(__struct)
30247    }
30248    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30249        let mut __tmp = BytesMut::new(bytes);
30250        #[allow(clippy::absurd_extreme_comparisons)]
30251        #[allow(unused_comparisons)]
30252        if __tmp.remaining() < Self::ENCODED_LEN {
30253            panic!(
30254                "buffer is too small (need {} bytes, but got {})",
30255                Self::ENCODED_LEN,
30256                __tmp.remaining(),
30257            )
30258        }
30259        __tmp.put_u64_le(self.time_usec);
30260        for val in &self.pos_x {
30261            __tmp.put_f32_le(*val);
30262        }
30263        for val in &self.pos_y {
30264            __tmp.put_f32_le(*val);
30265        }
30266        for val in &self.pos_z {
30267            __tmp.put_f32_le(*val);
30268        }
30269        for val in &self.delta {
30270            __tmp.put_f32_le(*val);
30271        }
30272        for val in &self.pos_yaw {
30273            __tmp.put_f32_le(*val);
30274        }
30275        __tmp.put_u8(self.valid_points);
30276        if matches!(version, MavlinkVersion::V2) {
30277            let len = __tmp.len();
30278            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30279        } else {
30280            __tmp.len()
30281        }
30282    }
30283}
30284#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30285#[doc = ""]
30286#[doc = "ID: 332"]
30287#[derive(Debug, Clone, PartialEq)]
30288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30290#[cfg_attr(feature = "ts", derive(TS))]
30291#[cfg_attr(feature = "ts", ts(export))]
30292pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30293    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30294    pub time_usec: u64,
30295    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30296    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30297    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30298    pub pos_x: [f32; 5],
30299    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30300    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30301    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30302    pub pos_y: [f32; 5],
30303    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30304    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30305    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30306    pub pos_z: [f32; 5],
30307    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30308    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30309    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30310    pub vel_x: [f32; 5],
30311    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30312    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30313    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30314    pub vel_y: [f32; 5],
30315    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30316    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30317    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30318    pub vel_z: [f32; 5],
30319    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30320    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30321    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30322    pub acc_x: [f32; 5],
30323    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30324    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30325    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30326    pub acc_y: [f32; 5],
30327    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30328    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30329    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30330    pub acc_z: [f32; 5],
30331    #[doc = "Yaw angle, set to NaN if not being used"]
30332    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30333    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30334    pub pos_yaw: [f32; 5],
30335    #[doc = "Yaw rate, set to NaN if not being used"]
30336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30337    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30338    pub vel_yaw: [f32; 5],
30339    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30340    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30341    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30342    pub command: [u16; 5],
30343    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30344    pub valid_points: u8,
30345}
30346impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30347    pub const ENCODED_LEN: usize = 239usize;
30348    pub const DEFAULT: Self = Self {
30349        time_usec: 0_u64,
30350        pos_x: [0.0_f32; 5usize],
30351        pos_y: [0.0_f32; 5usize],
30352        pos_z: [0.0_f32; 5usize],
30353        vel_x: [0.0_f32; 5usize],
30354        vel_y: [0.0_f32; 5usize],
30355        vel_z: [0.0_f32; 5usize],
30356        acc_x: [0.0_f32; 5usize],
30357        acc_y: [0.0_f32; 5usize],
30358        acc_z: [0.0_f32; 5usize],
30359        pos_yaw: [0.0_f32; 5usize],
30360        vel_yaw: [0.0_f32; 5usize],
30361        command: [0_u16; 5usize],
30362        valid_points: 0_u8,
30363    };
30364    #[cfg(feature = "arbitrary")]
30365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30366        use arbitrary::{Arbitrary, Unstructured};
30367        let mut buf = [0u8; 1024];
30368        rng.fill_bytes(&mut buf);
30369        let mut unstructured = Unstructured::new(&buf);
30370        Self::arbitrary(&mut unstructured).unwrap_or_default()
30371    }
30372}
30373impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30374    fn default() -> Self {
30375        Self::DEFAULT.clone()
30376    }
30377}
30378impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30379    type Message = MavMessage;
30380    const ID: u32 = 332u32;
30381    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30382    const EXTRA_CRC: u8 = 236u8;
30383    const ENCODED_LEN: usize = 239usize;
30384    fn deser(
30385        _version: MavlinkVersion,
30386        __input: &[u8],
30387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30388        let avail_len = __input.len();
30389        let mut payload_buf = [0; Self::ENCODED_LEN];
30390        let mut buf = if avail_len < Self::ENCODED_LEN {
30391            payload_buf[0..avail_len].copy_from_slice(__input);
30392            Bytes::new(&payload_buf)
30393        } else {
30394            Bytes::new(__input)
30395        };
30396        let mut __struct = Self::default();
30397        __struct.time_usec = buf.get_u64_le();
30398        for v in &mut __struct.pos_x {
30399            let val = buf.get_f32_le();
30400            *v = val;
30401        }
30402        for v in &mut __struct.pos_y {
30403            let val = buf.get_f32_le();
30404            *v = val;
30405        }
30406        for v in &mut __struct.pos_z {
30407            let val = buf.get_f32_le();
30408            *v = val;
30409        }
30410        for v in &mut __struct.vel_x {
30411            let val = buf.get_f32_le();
30412            *v = val;
30413        }
30414        for v in &mut __struct.vel_y {
30415            let val = buf.get_f32_le();
30416            *v = val;
30417        }
30418        for v in &mut __struct.vel_z {
30419            let val = buf.get_f32_le();
30420            *v = val;
30421        }
30422        for v in &mut __struct.acc_x {
30423            let val = buf.get_f32_le();
30424            *v = val;
30425        }
30426        for v in &mut __struct.acc_y {
30427            let val = buf.get_f32_le();
30428            *v = val;
30429        }
30430        for v in &mut __struct.acc_z {
30431            let val = buf.get_f32_le();
30432            *v = val;
30433        }
30434        for v in &mut __struct.pos_yaw {
30435            let val = buf.get_f32_le();
30436            *v = val;
30437        }
30438        for v in &mut __struct.vel_yaw {
30439            let val = buf.get_f32_le();
30440            *v = val;
30441        }
30442        for v in &mut __struct.command {
30443            let val = buf.get_u16_le();
30444            *v = val;
30445        }
30446        __struct.valid_points = buf.get_u8();
30447        Ok(__struct)
30448    }
30449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30450        let mut __tmp = BytesMut::new(bytes);
30451        #[allow(clippy::absurd_extreme_comparisons)]
30452        #[allow(unused_comparisons)]
30453        if __tmp.remaining() < Self::ENCODED_LEN {
30454            panic!(
30455                "buffer is too small (need {} bytes, but got {})",
30456                Self::ENCODED_LEN,
30457                __tmp.remaining(),
30458            )
30459        }
30460        __tmp.put_u64_le(self.time_usec);
30461        for val in &self.pos_x {
30462            __tmp.put_f32_le(*val);
30463        }
30464        for val in &self.pos_y {
30465            __tmp.put_f32_le(*val);
30466        }
30467        for val in &self.pos_z {
30468            __tmp.put_f32_le(*val);
30469        }
30470        for val in &self.vel_x {
30471            __tmp.put_f32_le(*val);
30472        }
30473        for val in &self.vel_y {
30474            __tmp.put_f32_le(*val);
30475        }
30476        for val in &self.vel_z {
30477            __tmp.put_f32_le(*val);
30478        }
30479        for val in &self.acc_x {
30480            __tmp.put_f32_le(*val);
30481        }
30482        for val in &self.acc_y {
30483            __tmp.put_f32_le(*val);
30484        }
30485        for val in &self.acc_z {
30486            __tmp.put_f32_le(*val);
30487        }
30488        for val in &self.pos_yaw {
30489            __tmp.put_f32_le(*val);
30490        }
30491        for val in &self.vel_yaw {
30492            __tmp.put_f32_le(*val);
30493        }
30494        for val in &self.command {
30495            __tmp.put_u16_le(*val);
30496        }
30497        __tmp.put_u8(self.valid_points);
30498        if matches!(version, MavlinkVersion::V2) {
30499            let len = __tmp.len();
30500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30501        } else {
30502            __tmp.len()
30503        }
30504    }
30505}
30506#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30507#[doc = ""]
30508#[doc = "ID: 385"]
30509#[derive(Debug, Clone, PartialEq)]
30510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30512#[cfg_attr(feature = "ts", derive(TS))]
30513#[cfg_attr(feature = "ts", ts(export))]
30514pub struct TUNNEL_DATA {
30515    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30516    pub payload_type: MavTunnelPayloadType,
30517    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30518    pub target_system: u8,
30519    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30520    pub target_component: u8,
30521    #[doc = "Length of the data transported in payload"]
30522    pub payload_length: u8,
30523    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30526    pub payload: [u8; 128],
30527}
30528impl TUNNEL_DATA {
30529    pub const ENCODED_LEN: usize = 133usize;
30530    pub const DEFAULT: Self = Self {
30531        payload_type: MavTunnelPayloadType::DEFAULT,
30532        target_system: 0_u8,
30533        target_component: 0_u8,
30534        payload_length: 0_u8,
30535        payload: [0_u8; 128usize],
30536    };
30537    #[cfg(feature = "arbitrary")]
30538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30539        use arbitrary::{Arbitrary, Unstructured};
30540        let mut buf = [0u8; 1024];
30541        rng.fill_bytes(&mut buf);
30542        let mut unstructured = Unstructured::new(&buf);
30543        Self::arbitrary(&mut unstructured).unwrap_or_default()
30544    }
30545}
30546impl Default for TUNNEL_DATA {
30547    fn default() -> Self {
30548        Self::DEFAULT.clone()
30549    }
30550}
30551impl MessageData for TUNNEL_DATA {
30552    type Message = MavMessage;
30553    const ID: u32 = 385u32;
30554    const NAME: &'static str = "TUNNEL";
30555    const EXTRA_CRC: u8 = 147u8;
30556    const ENCODED_LEN: usize = 133usize;
30557    fn deser(
30558        _version: MavlinkVersion,
30559        __input: &[u8],
30560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30561        let avail_len = __input.len();
30562        let mut payload_buf = [0; Self::ENCODED_LEN];
30563        let mut buf = if avail_len < Self::ENCODED_LEN {
30564            payload_buf[0..avail_len].copy_from_slice(__input);
30565            Bytes::new(&payload_buf)
30566        } else {
30567            Bytes::new(__input)
30568        };
30569        let mut __struct = Self::default();
30570        let tmp = buf.get_u16_le();
30571        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30572            ::mavlink_core::error::ParserError::InvalidEnum {
30573                enum_type: "MavTunnelPayloadType",
30574                value: tmp as u32,
30575            },
30576        )?;
30577        __struct.target_system = buf.get_u8();
30578        __struct.target_component = buf.get_u8();
30579        __struct.payload_length = buf.get_u8();
30580        for v in &mut __struct.payload {
30581            let val = buf.get_u8();
30582            *v = val;
30583        }
30584        Ok(__struct)
30585    }
30586    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30587        let mut __tmp = BytesMut::new(bytes);
30588        #[allow(clippy::absurd_extreme_comparisons)]
30589        #[allow(unused_comparisons)]
30590        if __tmp.remaining() < Self::ENCODED_LEN {
30591            panic!(
30592                "buffer is too small (need {} bytes, but got {})",
30593                Self::ENCODED_LEN,
30594                __tmp.remaining(),
30595            )
30596        }
30597        __tmp.put_u16_le(self.payload_type as u16);
30598        __tmp.put_u8(self.target_system);
30599        __tmp.put_u8(self.target_component);
30600        __tmp.put_u8(self.payload_length);
30601        for val in &self.payload {
30602            __tmp.put_u8(*val);
30603        }
30604        if matches!(version, MavlinkVersion::V2) {
30605            let len = __tmp.len();
30606            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30607        } else {
30608            __tmp.len()
30609        }
30610    }
30611}
30612#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30613#[doc = ""]
30614#[doc = "ID: 311"]
30615#[derive(Debug, Clone, PartialEq)]
30616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30618#[cfg_attr(feature = "ts", derive(TS))]
30619#[cfg_attr(feature = "ts", ts(export))]
30620pub struct UAVCAN_NODE_INFO_DATA {
30621    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30622    pub time_usec: u64,
30623    #[doc = "Time since the start-up of the node."]
30624    pub uptime_sec: u32,
30625    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30626    pub sw_vcs_commit: u32,
30627    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30628    #[cfg_attr(
30629        feature = "serde",
30630        serde(
30631            serialize_with = "crate::nulstr::serialize::<_, 80>",
30632            deserialize_with = "crate::nulstr::deserialize::<_, 80>"
30633        )
30634    )]
30635    #[cfg_attr(feature = "ts", ts(type = "string"))]
30636    pub name: [u8; 80],
30637    #[doc = "Hardware major version number."]
30638    pub hw_version_major: u8,
30639    #[doc = "Hardware minor version number."]
30640    pub hw_version_minor: u8,
30641    #[doc = "Hardware unique 128-bit ID."]
30642    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30643    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30644    pub hw_unique_id: [u8; 16],
30645    #[doc = "Software major version number."]
30646    pub sw_version_major: u8,
30647    #[doc = "Software minor version number."]
30648    pub sw_version_minor: u8,
30649}
30650impl UAVCAN_NODE_INFO_DATA {
30651    pub const ENCODED_LEN: usize = 116usize;
30652    pub const DEFAULT: Self = Self {
30653        time_usec: 0_u64,
30654        uptime_sec: 0_u32,
30655        sw_vcs_commit: 0_u32,
30656        name: [0_u8; 80usize],
30657        hw_version_major: 0_u8,
30658        hw_version_minor: 0_u8,
30659        hw_unique_id: [0_u8; 16usize],
30660        sw_version_major: 0_u8,
30661        sw_version_minor: 0_u8,
30662    };
30663    #[cfg(feature = "arbitrary")]
30664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30665        use arbitrary::{Arbitrary, Unstructured};
30666        let mut buf = [0u8; 1024];
30667        rng.fill_bytes(&mut buf);
30668        let mut unstructured = Unstructured::new(&buf);
30669        Self::arbitrary(&mut unstructured).unwrap_or_default()
30670    }
30671}
30672impl Default for UAVCAN_NODE_INFO_DATA {
30673    fn default() -> Self {
30674        Self::DEFAULT.clone()
30675    }
30676}
30677impl MessageData for UAVCAN_NODE_INFO_DATA {
30678    type Message = MavMessage;
30679    const ID: u32 = 311u32;
30680    const NAME: &'static str = "UAVCAN_NODE_INFO";
30681    const EXTRA_CRC: u8 = 95u8;
30682    const ENCODED_LEN: usize = 116usize;
30683    fn deser(
30684        _version: MavlinkVersion,
30685        __input: &[u8],
30686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30687        let avail_len = __input.len();
30688        let mut payload_buf = [0; Self::ENCODED_LEN];
30689        let mut buf = if avail_len < Self::ENCODED_LEN {
30690            payload_buf[0..avail_len].copy_from_slice(__input);
30691            Bytes::new(&payload_buf)
30692        } else {
30693            Bytes::new(__input)
30694        };
30695        let mut __struct = Self::default();
30696        __struct.time_usec = buf.get_u64_le();
30697        __struct.uptime_sec = buf.get_u32_le();
30698        __struct.sw_vcs_commit = buf.get_u32_le();
30699        for v in &mut __struct.name {
30700            let val = buf.get_u8();
30701            *v = val;
30702        }
30703        __struct.hw_version_major = buf.get_u8();
30704        __struct.hw_version_minor = buf.get_u8();
30705        for v in &mut __struct.hw_unique_id {
30706            let val = buf.get_u8();
30707            *v = val;
30708        }
30709        __struct.sw_version_major = buf.get_u8();
30710        __struct.sw_version_minor = buf.get_u8();
30711        Ok(__struct)
30712    }
30713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30714        let mut __tmp = BytesMut::new(bytes);
30715        #[allow(clippy::absurd_extreme_comparisons)]
30716        #[allow(unused_comparisons)]
30717        if __tmp.remaining() < Self::ENCODED_LEN {
30718            panic!(
30719                "buffer is too small (need {} bytes, but got {})",
30720                Self::ENCODED_LEN,
30721                __tmp.remaining(),
30722            )
30723        }
30724        __tmp.put_u64_le(self.time_usec);
30725        __tmp.put_u32_le(self.uptime_sec);
30726        __tmp.put_u32_le(self.sw_vcs_commit);
30727        for val in &self.name {
30728            __tmp.put_u8(*val);
30729        }
30730        __tmp.put_u8(self.hw_version_major);
30731        __tmp.put_u8(self.hw_version_minor);
30732        for val in &self.hw_unique_id {
30733            __tmp.put_u8(*val);
30734        }
30735        __tmp.put_u8(self.sw_version_major);
30736        __tmp.put_u8(self.sw_version_minor);
30737        if matches!(version, MavlinkVersion::V2) {
30738            let len = __tmp.len();
30739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30740        } else {
30741            __tmp.len()
30742        }
30743    }
30744}
30745#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30746#[doc = ""]
30747#[doc = "ID: 310"]
30748#[derive(Debug, Clone, PartialEq)]
30749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30751#[cfg_attr(feature = "ts", derive(TS))]
30752#[cfg_attr(feature = "ts", ts(export))]
30753pub struct UAVCAN_NODE_STATUS_DATA {
30754    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30755    pub time_usec: u64,
30756    #[doc = "Time since the start-up of the node."]
30757    pub uptime_sec: u32,
30758    #[doc = "Vendor-specific status information."]
30759    pub vendor_specific_status_code: u16,
30760    #[doc = "Generalized node health status."]
30761    pub health: UavcanNodeHealth,
30762    #[doc = "Generalized operating mode."]
30763    pub mode: UavcanNodeMode,
30764    #[doc = "Not used currently."]
30765    pub sub_mode: u8,
30766}
30767impl UAVCAN_NODE_STATUS_DATA {
30768    pub const ENCODED_LEN: usize = 17usize;
30769    pub const DEFAULT: Self = Self {
30770        time_usec: 0_u64,
30771        uptime_sec: 0_u32,
30772        vendor_specific_status_code: 0_u16,
30773        health: UavcanNodeHealth::DEFAULT,
30774        mode: UavcanNodeMode::DEFAULT,
30775        sub_mode: 0_u8,
30776    };
30777    #[cfg(feature = "arbitrary")]
30778    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30779        use arbitrary::{Arbitrary, Unstructured};
30780        let mut buf = [0u8; 1024];
30781        rng.fill_bytes(&mut buf);
30782        let mut unstructured = Unstructured::new(&buf);
30783        Self::arbitrary(&mut unstructured).unwrap_or_default()
30784    }
30785}
30786impl Default for UAVCAN_NODE_STATUS_DATA {
30787    fn default() -> Self {
30788        Self::DEFAULT.clone()
30789    }
30790}
30791impl MessageData for UAVCAN_NODE_STATUS_DATA {
30792    type Message = MavMessage;
30793    const ID: u32 = 310u32;
30794    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30795    const EXTRA_CRC: u8 = 28u8;
30796    const ENCODED_LEN: usize = 17usize;
30797    fn deser(
30798        _version: MavlinkVersion,
30799        __input: &[u8],
30800    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30801        let avail_len = __input.len();
30802        let mut payload_buf = [0; Self::ENCODED_LEN];
30803        let mut buf = if avail_len < Self::ENCODED_LEN {
30804            payload_buf[0..avail_len].copy_from_slice(__input);
30805            Bytes::new(&payload_buf)
30806        } else {
30807            Bytes::new(__input)
30808        };
30809        let mut __struct = Self::default();
30810        __struct.time_usec = buf.get_u64_le();
30811        __struct.uptime_sec = buf.get_u32_le();
30812        __struct.vendor_specific_status_code = buf.get_u16_le();
30813        let tmp = buf.get_u8();
30814        __struct.health =
30815            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30816                enum_type: "UavcanNodeHealth",
30817                value: tmp as u32,
30818            })?;
30819        let tmp = buf.get_u8();
30820        __struct.mode =
30821            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30822                enum_type: "UavcanNodeMode",
30823                value: tmp as u32,
30824            })?;
30825        __struct.sub_mode = buf.get_u8();
30826        Ok(__struct)
30827    }
30828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30829        let mut __tmp = BytesMut::new(bytes);
30830        #[allow(clippy::absurd_extreme_comparisons)]
30831        #[allow(unused_comparisons)]
30832        if __tmp.remaining() < Self::ENCODED_LEN {
30833            panic!(
30834                "buffer is too small (need {} bytes, but got {})",
30835                Self::ENCODED_LEN,
30836                __tmp.remaining(),
30837            )
30838        }
30839        __tmp.put_u64_le(self.time_usec);
30840        __tmp.put_u32_le(self.uptime_sec);
30841        __tmp.put_u16_le(self.vendor_specific_status_code);
30842        __tmp.put_u8(self.health as u8);
30843        __tmp.put_u8(self.mode as u8);
30844        __tmp.put_u8(self.sub_mode);
30845        if matches!(version, MavlinkVersion::V2) {
30846            let len = __tmp.len();
30847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30848        } else {
30849            __tmp.len()
30850        }
30851    }
30852}
30853#[doc = "The global position resulting from GPS and sensor fusion."]
30854#[doc = ""]
30855#[doc = "ID: 340"]
30856#[derive(Debug, Clone, PartialEq)]
30857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30859#[cfg_attr(feature = "ts", derive(TS))]
30860#[cfg_attr(feature = "ts", ts(export))]
30861pub struct UTM_GLOBAL_POSITION_DATA {
30862    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30863    pub time: u64,
30864    #[doc = "Latitude (WGS84)"]
30865    pub lat: i32,
30866    #[doc = "Longitude (WGS84)"]
30867    pub lon: i32,
30868    #[doc = "Altitude (WGS84)"]
30869    pub alt: i32,
30870    #[doc = "Altitude above ground"]
30871    pub relative_alt: i32,
30872    #[doc = "Next waypoint, latitude (WGS84)"]
30873    pub next_lat: i32,
30874    #[doc = "Next waypoint, longitude (WGS84)"]
30875    pub next_lon: i32,
30876    #[doc = "Next waypoint, altitude (WGS84)"]
30877    pub next_alt: i32,
30878    #[doc = "Ground X speed (latitude, positive north)"]
30879    pub vx: i16,
30880    #[doc = "Ground Y speed (longitude, positive east)"]
30881    pub vy: i16,
30882    #[doc = "Ground Z speed (altitude, positive down)"]
30883    pub vz: i16,
30884    #[doc = "Horizontal position uncertainty (standard deviation)"]
30885    pub h_acc: u16,
30886    #[doc = "Altitude uncertainty (standard deviation)"]
30887    pub v_acc: u16,
30888    #[doc = "Speed uncertainty (standard deviation)"]
30889    pub vel_acc: u16,
30890    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30891    pub update_rate: u16,
30892    #[doc = "Unique UAS ID."]
30893    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30894    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30895    pub uas_id: [u8; 18],
30896    #[doc = "Flight state"]
30897    pub flight_state: UtmFlightState,
30898    #[doc = "Bitwise OR combination of the data available flags."]
30899    pub flags: UtmDataAvailFlags,
30900}
30901impl UTM_GLOBAL_POSITION_DATA {
30902    pub const ENCODED_LEN: usize = 70usize;
30903    pub const DEFAULT: Self = Self {
30904        time: 0_u64,
30905        lat: 0_i32,
30906        lon: 0_i32,
30907        alt: 0_i32,
30908        relative_alt: 0_i32,
30909        next_lat: 0_i32,
30910        next_lon: 0_i32,
30911        next_alt: 0_i32,
30912        vx: 0_i16,
30913        vy: 0_i16,
30914        vz: 0_i16,
30915        h_acc: 0_u16,
30916        v_acc: 0_u16,
30917        vel_acc: 0_u16,
30918        update_rate: 0_u16,
30919        uas_id: [0_u8; 18usize],
30920        flight_state: UtmFlightState::DEFAULT,
30921        flags: UtmDataAvailFlags::DEFAULT,
30922    };
30923    #[cfg(feature = "arbitrary")]
30924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30925        use arbitrary::{Arbitrary, Unstructured};
30926        let mut buf = [0u8; 1024];
30927        rng.fill_bytes(&mut buf);
30928        let mut unstructured = Unstructured::new(&buf);
30929        Self::arbitrary(&mut unstructured).unwrap_or_default()
30930    }
30931}
30932impl Default for UTM_GLOBAL_POSITION_DATA {
30933    fn default() -> Self {
30934        Self::DEFAULT.clone()
30935    }
30936}
30937impl MessageData for UTM_GLOBAL_POSITION_DATA {
30938    type Message = MavMessage;
30939    const ID: u32 = 340u32;
30940    const NAME: &'static str = "UTM_GLOBAL_POSITION";
30941    const EXTRA_CRC: u8 = 99u8;
30942    const ENCODED_LEN: usize = 70usize;
30943    fn deser(
30944        _version: MavlinkVersion,
30945        __input: &[u8],
30946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30947        let avail_len = __input.len();
30948        let mut payload_buf = [0; Self::ENCODED_LEN];
30949        let mut buf = if avail_len < Self::ENCODED_LEN {
30950            payload_buf[0..avail_len].copy_from_slice(__input);
30951            Bytes::new(&payload_buf)
30952        } else {
30953            Bytes::new(__input)
30954        };
30955        let mut __struct = Self::default();
30956        __struct.time = buf.get_u64_le();
30957        __struct.lat = buf.get_i32_le();
30958        __struct.lon = buf.get_i32_le();
30959        __struct.alt = buf.get_i32_le();
30960        __struct.relative_alt = buf.get_i32_le();
30961        __struct.next_lat = buf.get_i32_le();
30962        __struct.next_lon = buf.get_i32_le();
30963        __struct.next_alt = buf.get_i32_le();
30964        __struct.vx = buf.get_i16_le();
30965        __struct.vy = buf.get_i16_le();
30966        __struct.vz = buf.get_i16_le();
30967        __struct.h_acc = buf.get_u16_le();
30968        __struct.v_acc = buf.get_u16_le();
30969        __struct.vel_acc = buf.get_u16_le();
30970        __struct.update_rate = buf.get_u16_le();
30971        for v in &mut __struct.uas_id {
30972            let val = buf.get_u8();
30973            *v = val;
30974        }
30975        let tmp = buf.get_u8();
30976        __struct.flight_state =
30977            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30978                enum_type: "UtmFlightState",
30979                value: tmp as u32,
30980            })?;
30981        let tmp = buf.get_u8();
30982        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
30983            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30984                flag_type: "UtmDataAvailFlags",
30985                value: tmp as u32,
30986            })?;
30987        Ok(__struct)
30988    }
30989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30990        let mut __tmp = BytesMut::new(bytes);
30991        #[allow(clippy::absurd_extreme_comparisons)]
30992        #[allow(unused_comparisons)]
30993        if __tmp.remaining() < Self::ENCODED_LEN {
30994            panic!(
30995                "buffer is too small (need {} bytes, but got {})",
30996                Self::ENCODED_LEN,
30997                __tmp.remaining(),
30998            )
30999        }
31000        __tmp.put_u64_le(self.time);
31001        __tmp.put_i32_le(self.lat);
31002        __tmp.put_i32_le(self.lon);
31003        __tmp.put_i32_le(self.alt);
31004        __tmp.put_i32_le(self.relative_alt);
31005        __tmp.put_i32_le(self.next_lat);
31006        __tmp.put_i32_le(self.next_lon);
31007        __tmp.put_i32_le(self.next_alt);
31008        __tmp.put_i16_le(self.vx);
31009        __tmp.put_i16_le(self.vy);
31010        __tmp.put_i16_le(self.vz);
31011        __tmp.put_u16_le(self.h_acc);
31012        __tmp.put_u16_le(self.v_acc);
31013        __tmp.put_u16_le(self.vel_acc);
31014        __tmp.put_u16_le(self.update_rate);
31015        for val in &self.uas_id {
31016            __tmp.put_u8(*val);
31017        }
31018        __tmp.put_u8(self.flight_state as u8);
31019        __tmp.put_u8(self.flags.bits());
31020        if matches!(version, MavlinkVersion::V2) {
31021            let len = __tmp.len();
31022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31023        } else {
31024            __tmp.len()
31025        }
31026    }
31027}
31028#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31029#[doc = ""]
31030#[doc = "ID: 248"]
31031#[derive(Debug, Clone, PartialEq)]
31032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31034#[cfg_attr(feature = "ts", derive(TS))]
31035#[cfg_attr(feature = "ts", ts(export))]
31036pub struct V2_EXTENSION_DATA {
31037    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31038    pub message_type: u16,
31039    #[doc = "Network ID (0 for broadcast)"]
31040    pub target_network: u8,
31041    #[doc = "System ID (0 for broadcast)"]
31042    pub target_system: u8,
31043    #[doc = "Component ID (0 for broadcast)"]
31044    pub target_component: u8,
31045    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31046    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31047    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31048    pub payload: [u8; 249],
31049}
31050impl V2_EXTENSION_DATA {
31051    pub const ENCODED_LEN: usize = 254usize;
31052    pub const DEFAULT: Self = Self {
31053        message_type: 0_u16,
31054        target_network: 0_u8,
31055        target_system: 0_u8,
31056        target_component: 0_u8,
31057        payload: [0_u8; 249usize],
31058    };
31059    #[cfg(feature = "arbitrary")]
31060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31061        use arbitrary::{Arbitrary, Unstructured};
31062        let mut buf = [0u8; 1024];
31063        rng.fill_bytes(&mut buf);
31064        let mut unstructured = Unstructured::new(&buf);
31065        Self::arbitrary(&mut unstructured).unwrap_or_default()
31066    }
31067}
31068impl Default for V2_EXTENSION_DATA {
31069    fn default() -> Self {
31070        Self::DEFAULT.clone()
31071    }
31072}
31073impl MessageData for V2_EXTENSION_DATA {
31074    type Message = MavMessage;
31075    const ID: u32 = 248u32;
31076    const NAME: &'static str = "V2_EXTENSION";
31077    const EXTRA_CRC: u8 = 8u8;
31078    const ENCODED_LEN: usize = 254usize;
31079    fn deser(
31080        _version: MavlinkVersion,
31081        __input: &[u8],
31082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31083        let avail_len = __input.len();
31084        let mut payload_buf = [0; Self::ENCODED_LEN];
31085        let mut buf = if avail_len < Self::ENCODED_LEN {
31086            payload_buf[0..avail_len].copy_from_slice(__input);
31087            Bytes::new(&payload_buf)
31088        } else {
31089            Bytes::new(__input)
31090        };
31091        let mut __struct = Self::default();
31092        __struct.message_type = buf.get_u16_le();
31093        __struct.target_network = buf.get_u8();
31094        __struct.target_system = buf.get_u8();
31095        __struct.target_component = buf.get_u8();
31096        for v in &mut __struct.payload {
31097            let val = buf.get_u8();
31098            *v = val;
31099        }
31100        Ok(__struct)
31101    }
31102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31103        let mut __tmp = BytesMut::new(bytes);
31104        #[allow(clippy::absurd_extreme_comparisons)]
31105        #[allow(unused_comparisons)]
31106        if __tmp.remaining() < Self::ENCODED_LEN {
31107            panic!(
31108                "buffer is too small (need {} bytes, but got {})",
31109                Self::ENCODED_LEN,
31110                __tmp.remaining(),
31111            )
31112        }
31113        __tmp.put_u16_le(self.message_type);
31114        __tmp.put_u8(self.target_network);
31115        __tmp.put_u8(self.target_system);
31116        __tmp.put_u8(self.target_component);
31117        for val in &self.payload {
31118            __tmp.put_u8(*val);
31119        }
31120        if matches!(version, MavlinkVersion::V2) {
31121            let len = __tmp.len();
31122            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31123        } else {
31124            __tmp.len()
31125        }
31126    }
31127}
31128#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31129#[doc = ""]
31130#[doc = "ID: 74"]
31131#[derive(Debug, Clone, PartialEq)]
31132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31134#[cfg_attr(feature = "ts", derive(TS))]
31135#[cfg_attr(feature = "ts", ts(export))]
31136pub struct VFR_HUD_DATA {
31137    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31138    pub airspeed: f32,
31139    #[doc = "Current ground speed."]
31140    pub groundspeed: f32,
31141    #[doc = "Current altitude (MSL)."]
31142    pub alt: f32,
31143    #[doc = "Current climb rate."]
31144    pub climb: f32,
31145    #[doc = "Current heading in compass units (0-360, 0=north)."]
31146    pub heading: i16,
31147    #[doc = "Current throttle setting (0 to 100)."]
31148    pub throttle: u16,
31149}
31150impl VFR_HUD_DATA {
31151    pub const ENCODED_LEN: usize = 20usize;
31152    pub const DEFAULT: Self = Self {
31153        airspeed: 0.0_f32,
31154        groundspeed: 0.0_f32,
31155        alt: 0.0_f32,
31156        climb: 0.0_f32,
31157        heading: 0_i16,
31158        throttle: 0_u16,
31159    };
31160    #[cfg(feature = "arbitrary")]
31161    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31162        use arbitrary::{Arbitrary, Unstructured};
31163        let mut buf = [0u8; 1024];
31164        rng.fill_bytes(&mut buf);
31165        let mut unstructured = Unstructured::new(&buf);
31166        Self::arbitrary(&mut unstructured).unwrap_or_default()
31167    }
31168}
31169impl Default for VFR_HUD_DATA {
31170    fn default() -> Self {
31171        Self::DEFAULT.clone()
31172    }
31173}
31174impl MessageData for VFR_HUD_DATA {
31175    type Message = MavMessage;
31176    const ID: u32 = 74u32;
31177    const NAME: &'static str = "VFR_HUD";
31178    const EXTRA_CRC: u8 = 20u8;
31179    const ENCODED_LEN: usize = 20usize;
31180    fn deser(
31181        _version: MavlinkVersion,
31182        __input: &[u8],
31183    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31184        let avail_len = __input.len();
31185        let mut payload_buf = [0; Self::ENCODED_LEN];
31186        let mut buf = if avail_len < Self::ENCODED_LEN {
31187            payload_buf[0..avail_len].copy_from_slice(__input);
31188            Bytes::new(&payload_buf)
31189        } else {
31190            Bytes::new(__input)
31191        };
31192        let mut __struct = Self::default();
31193        __struct.airspeed = buf.get_f32_le();
31194        __struct.groundspeed = buf.get_f32_le();
31195        __struct.alt = buf.get_f32_le();
31196        __struct.climb = buf.get_f32_le();
31197        __struct.heading = buf.get_i16_le();
31198        __struct.throttle = buf.get_u16_le();
31199        Ok(__struct)
31200    }
31201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31202        let mut __tmp = BytesMut::new(bytes);
31203        #[allow(clippy::absurd_extreme_comparisons)]
31204        #[allow(unused_comparisons)]
31205        if __tmp.remaining() < Self::ENCODED_LEN {
31206            panic!(
31207                "buffer is too small (need {} bytes, but got {})",
31208                Self::ENCODED_LEN,
31209                __tmp.remaining(),
31210            )
31211        }
31212        __tmp.put_f32_le(self.airspeed);
31213        __tmp.put_f32_le(self.groundspeed);
31214        __tmp.put_f32_le(self.alt);
31215        __tmp.put_f32_le(self.climb);
31216        __tmp.put_i16_le(self.heading);
31217        __tmp.put_u16_le(self.throttle);
31218        if matches!(version, MavlinkVersion::V2) {
31219            let len = __tmp.len();
31220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31221        } else {
31222            __tmp.len()
31223        }
31224    }
31225}
31226#[doc = "Vibration levels and accelerometer clipping."]
31227#[doc = ""]
31228#[doc = "ID: 241"]
31229#[derive(Debug, Clone, PartialEq)]
31230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31232#[cfg_attr(feature = "ts", derive(TS))]
31233#[cfg_attr(feature = "ts", ts(export))]
31234pub struct VIBRATION_DATA {
31235    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31236    pub time_usec: u64,
31237    #[doc = "Vibration levels on X-axis"]
31238    pub vibration_x: f32,
31239    #[doc = "Vibration levels on Y-axis"]
31240    pub vibration_y: f32,
31241    #[doc = "Vibration levels on Z-axis"]
31242    pub vibration_z: f32,
31243    #[doc = "first accelerometer clipping count"]
31244    pub clipping_0: u32,
31245    #[doc = "second accelerometer clipping count"]
31246    pub clipping_1: u32,
31247    #[doc = "third accelerometer clipping count"]
31248    pub clipping_2: u32,
31249}
31250impl VIBRATION_DATA {
31251    pub const ENCODED_LEN: usize = 32usize;
31252    pub const DEFAULT: Self = Self {
31253        time_usec: 0_u64,
31254        vibration_x: 0.0_f32,
31255        vibration_y: 0.0_f32,
31256        vibration_z: 0.0_f32,
31257        clipping_0: 0_u32,
31258        clipping_1: 0_u32,
31259        clipping_2: 0_u32,
31260    };
31261    #[cfg(feature = "arbitrary")]
31262    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31263        use arbitrary::{Arbitrary, Unstructured};
31264        let mut buf = [0u8; 1024];
31265        rng.fill_bytes(&mut buf);
31266        let mut unstructured = Unstructured::new(&buf);
31267        Self::arbitrary(&mut unstructured).unwrap_or_default()
31268    }
31269}
31270impl Default for VIBRATION_DATA {
31271    fn default() -> Self {
31272        Self::DEFAULT.clone()
31273    }
31274}
31275impl MessageData for VIBRATION_DATA {
31276    type Message = MavMessage;
31277    const ID: u32 = 241u32;
31278    const NAME: &'static str = "VIBRATION";
31279    const EXTRA_CRC: u8 = 90u8;
31280    const ENCODED_LEN: usize = 32usize;
31281    fn deser(
31282        _version: MavlinkVersion,
31283        __input: &[u8],
31284    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31285        let avail_len = __input.len();
31286        let mut payload_buf = [0; Self::ENCODED_LEN];
31287        let mut buf = if avail_len < Self::ENCODED_LEN {
31288            payload_buf[0..avail_len].copy_from_slice(__input);
31289            Bytes::new(&payload_buf)
31290        } else {
31291            Bytes::new(__input)
31292        };
31293        let mut __struct = Self::default();
31294        __struct.time_usec = buf.get_u64_le();
31295        __struct.vibration_x = buf.get_f32_le();
31296        __struct.vibration_y = buf.get_f32_le();
31297        __struct.vibration_z = buf.get_f32_le();
31298        __struct.clipping_0 = buf.get_u32_le();
31299        __struct.clipping_1 = buf.get_u32_le();
31300        __struct.clipping_2 = buf.get_u32_le();
31301        Ok(__struct)
31302    }
31303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31304        let mut __tmp = BytesMut::new(bytes);
31305        #[allow(clippy::absurd_extreme_comparisons)]
31306        #[allow(unused_comparisons)]
31307        if __tmp.remaining() < Self::ENCODED_LEN {
31308            panic!(
31309                "buffer is too small (need {} bytes, but got {})",
31310                Self::ENCODED_LEN,
31311                __tmp.remaining(),
31312            )
31313        }
31314        __tmp.put_u64_le(self.time_usec);
31315        __tmp.put_f32_le(self.vibration_x);
31316        __tmp.put_f32_le(self.vibration_y);
31317        __tmp.put_f32_le(self.vibration_z);
31318        __tmp.put_u32_le(self.clipping_0);
31319        __tmp.put_u32_le(self.clipping_1);
31320        __tmp.put_u32_le(self.clipping_2);
31321        if matches!(version, MavlinkVersion::V2) {
31322            let len = __tmp.len();
31323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31324        } else {
31325            __tmp.len()
31326        }
31327    }
31328}
31329#[doc = "Global position estimate from a Vicon motion system source."]
31330#[doc = ""]
31331#[doc = "ID: 104"]
31332#[derive(Debug, Clone, PartialEq)]
31333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31335#[cfg_attr(feature = "ts", derive(TS))]
31336#[cfg_attr(feature = "ts", ts(export))]
31337pub struct VICON_POSITION_ESTIMATE_DATA {
31338    #[doc = "Timestamp (UNIX time or time since system boot)"]
31339    pub usec: u64,
31340    #[doc = "Global X position"]
31341    pub x: f32,
31342    #[doc = "Global Y position"]
31343    pub y: f32,
31344    #[doc = "Global Z position"]
31345    pub z: f32,
31346    #[doc = "Roll angle"]
31347    pub roll: f32,
31348    #[doc = "Pitch angle"]
31349    pub pitch: f32,
31350    #[doc = "Yaw angle"]
31351    pub yaw: f32,
31352    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31353    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31355    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31356    pub covariance: [f32; 21],
31357}
31358impl VICON_POSITION_ESTIMATE_DATA {
31359    pub const ENCODED_LEN: usize = 116usize;
31360    pub const DEFAULT: Self = Self {
31361        usec: 0_u64,
31362        x: 0.0_f32,
31363        y: 0.0_f32,
31364        z: 0.0_f32,
31365        roll: 0.0_f32,
31366        pitch: 0.0_f32,
31367        yaw: 0.0_f32,
31368        covariance: [0.0_f32; 21usize],
31369    };
31370    #[cfg(feature = "arbitrary")]
31371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31372        use arbitrary::{Arbitrary, Unstructured};
31373        let mut buf = [0u8; 1024];
31374        rng.fill_bytes(&mut buf);
31375        let mut unstructured = Unstructured::new(&buf);
31376        Self::arbitrary(&mut unstructured).unwrap_or_default()
31377    }
31378}
31379impl Default for VICON_POSITION_ESTIMATE_DATA {
31380    fn default() -> Self {
31381        Self::DEFAULT.clone()
31382    }
31383}
31384impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31385    type Message = MavMessage;
31386    const ID: u32 = 104u32;
31387    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31388    const EXTRA_CRC: u8 = 56u8;
31389    const ENCODED_LEN: usize = 116usize;
31390    fn deser(
31391        _version: MavlinkVersion,
31392        __input: &[u8],
31393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31394        let avail_len = __input.len();
31395        let mut payload_buf = [0; Self::ENCODED_LEN];
31396        let mut buf = if avail_len < Self::ENCODED_LEN {
31397            payload_buf[0..avail_len].copy_from_slice(__input);
31398            Bytes::new(&payload_buf)
31399        } else {
31400            Bytes::new(__input)
31401        };
31402        let mut __struct = Self::default();
31403        __struct.usec = buf.get_u64_le();
31404        __struct.x = buf.get_f32_le();
31405        __struct.y = buf.get_f32_le();
31406        __struct.z = buf.get_f32_le();
31407        __struct.roll = buf.get_f32_le();
31408        __struct.pitch = buf.get_f32_le();
31409        __struct.yaw = buf.get_f32_le();
31410        for v in &mut __struct.covariance {
31411            let val = buf.get_f32_le();
31412            *v = val;
31413        }
31414        Ok(__struct)
31415    }
31416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31417        let mut __tmp = BytesMut::new(bytes);
31418        #[allow(clippy::absurd_extreme_comparisons)]
31419        #[allow(unused_comparisons)]
31420        if __tmp.remaining() < Self::ENCODED_LEN {
31421            panic!(
31422                "buffer is too small (need {} bytes, but got {})",
31423                Self::ENCODED_LEN,
31424                __tmp.remaining(),
31425            )
31426        }
31427        __tmp.put_u64_le(self.usec);
31428        __tmp.put_f32_le(self.x);
31429        __tmp.put_f32_le(self.y);
31430        __tmp.put_f32_le(self.z);
31431        __tmp.put_f32_le(self.roll);
31432        __tmp.put_f32_le(self.pitch);
31433        __tmp.put_f32_le(self.yaw);
31434        if matches!(version, MavlinkVersion::V2) {
31435            for val in &self.covariance {
31436                __tmp.put_f32_le(*val);
31437            }
31438            let len = __tmp.len();
31439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31440        } else {
31441            __tmp.len()
31442        }
31443    }
31444}
31445#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31446#[doc = ""]
31447#[doc = "ID: 269"]
31448#[derive(Debug, Clone, PartialEq)]
31449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31451#[cfg_attr(feature = "ts", derive(TS))]
31452#[cfg_attr(feature = "ts", ts(export))]
31453pub struct VIDEO_STREAM_INFORMATION_DATA {
31454    #[doc = "Frame rate."]
31455    pub framerate: f32,
31456    #[doc = "Bit rate."]
31457    pub bitrate: u32,
31458    #[doc = "Bitmap of stream status flags."]
31459    pub flags: VideoStreamStatusFlags,
31460    #[doc = "Horizontal resolution."]
31461    pub resolution_h: u16,
31462    #[doc = "Vertical resolution."]
31463    pub resolution_v: u16,
31464    #[doc = "Video image rotation clockwise."]
31465    pub rotation: u16,
31466    #[doc = "Horizontal Field of view."]
31467    pub hfov: u16,
31468    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31469    pub stream_id: u8,
31470    #[doc = "Number of streams available."]
31471    pub count: u8,
31472    #[doc = "Type of stream."]
31473    pub mavtype: VideoStreamType,
31474    #[doc = "Stream name."]
31475    #[cfg_attr(
31476        feature = "serde",
31477        serde(
31478            serialize_with = "crate::nulstr::serialize::<_, 32>",
31479            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
31480        )
31481    )]
31482    #[cfg_attr(feature = "ts", ts(type = "string"))]
31483    pub name: [u8; 32],
31484    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31485    #[cfg_attr(
31486        feature = "serde",
31487        serde(
31488            serialize_with = "crate::nulstr::serialize::<_, 160>",
31489            deserialize_with = "crate::nulstr::deserialize::<_, 160>"
31490        )
31491    )]
31492    #[cfg_attr(feature = "ts", ts(type = "string"))]
31493    pub uri: [u8; 160],
31494    #[doc = "Encoding of stream."]
31495    #[cfg_attr(feature = "serde", serde(default))]
31496    pub encoding: VideoStreamEncoding,
31497    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31498    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31499    pub camera_device_id: u8,
31500}
31501impl VIDEO_STREAM_INFORMATION_DATA {
31502    pub const ENCODED_LEN: usize = 215usize;
31503    pub const DEFAULT: Self = Self {
31504        framerate: 0.0_f32,
31505        bitrate: 0_u32,
31506        flags: VideoStreamStatusFlags::DEFAULT,
31507        resolution_h: 0_u16,
31508        resolution_v: 0_u16,
31509        rotation: 0_u16,
31510        hfov: 0_u16,
31511        stream_id: 0_u8,
31512        count: 0_u8,
31513        mavtype: VideoStreamType::DEFAULT,
31514        name: [0_u8; 32usize],
31515        uri: [0_u8; 160usize],
31516        encoding: VideoStreamEncoding::DEFAULT,
31517        camera_device_id: 0_u8,
31518    };
31519    #[cfg(feature = "arbitrary")]
31520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31521        use arbitrary::{Arbitrary, Unstructured};
31522        let mut buf = [0u8; 1024];
31523        rng.fill_bytes(&mut buf);
31524        let mut unstructured = Unstructured::new(&buf);
31525        Self::arbitrary(&mut unstructured).unwrap_or_default()
31526    }
31527}
31528impl Default for VIDEO_STREAM_INFORMATION_DATA {
31529    fn default() -> Self {
31530        Self::DEFAULT.clone()
31531    }
31532}
31533impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31534    type Message = MavMessage;
31535    const ID: u32 = 269u32;
31536    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31537    const EXTRA_CRC: u8 = 109u8;
31538    const ENCODED_LEN: usize = 215usize;
31539    fn deser(
31540        _version: MavlinkVersion,
31541        __input: &[u8],
31542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31543        let avail_len = __input.len();
31544        let mut payload_buf = [0; Self::ENCODED_LEN];
31545        let mut buf = if avail_len < Self::ENCODED_LEN {
31546            payload_buf[0..avail_len].copy_from_slice(__input);
31547            Bytes::new(&payload_buf)
31548        } else {
31549            Bytes::new(__input)
31550        };
31551        let mut __struct = Self::default();
31552        __struct.framerate = buf.get_f32_le();
31553        __struct.bitrate = buf.get_u32_le();
31554        let tmp = buf.get_u16_le();
31555        __struct.flags = VideoStreamStatusFlags::from_bits(
31556            tmp & VideoStreamStatusFlags::all().bits(),
31557        )
31558        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31559            flag_type: "VideoStreamStatusFlags",
31560            value: tmp as u32,
31561        })?;
31562        __struct.resolution_h = buf.get_u16_le();
31563        __struct.resolution_v = buf.get_u16_le();
31564        __struct.rotation = buf.get_u16_le();
31565        __struct.hfov = buf.get_u16_le();
31566        __struct.stream_id = buf.get_u8();
31567        __struct.count = buf.get_u8();
31568        let tmp = buf.get_u8();
31569        __struct.mavtype =
31570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31571                enum_type: "VideoStreamType",
31572                value: tmp as u32,
31573            })?;
31574        for v in &mut __struct.name {
31575            let val = buf.get_u8();
31576            *v = val;
31577        }
31578        for v in &mut __struct.uri {
31579            let val = buf.get_u8();
31580            *v = val;
31581        }
31582        let tmp = buf.get_u8();
31583        __struct.encoding =
31584            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31585                enum_type: "VideoStreamEncoding",
31586                value: tmp as u32,
31587            })?;
31588        __struct.camera_device_id = buf.get_u8();
31589        Ok(__struct)
31590    }
31591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31592        let mut __tmp = BytesMut::new(bytes);
31593        #[allow(clippy::absurd_extreme_comparisons)]
31594        #[allow(unused_comparisons)]
31595        if __tmp.remaining() < Self::ENCODED_LEN {
31596            panic!(
31597                "buffer is too small (need {} bytes, but got {})",
31598                Self::ENCODED_LEN,
31599                __tmp.remaining(),
31600            )
31601        }
31602        __tmp.put_f32_le(self.framerate);
31603        __tmp.put_u32_le(self.bitrate);
31604        __tmp.put_u16_le(self.flags.bits());
31605        __tmp.put_u16_le(self.resolution_h);
31606        __tmp.put_u16_le(self.resolution_v);
31607        __tmp.put_u16_le(self.rotation);
31608        __tmp.put_u16_le(self.hfov);
31609        __tmp.put_u8(self.stream_id);
31610        __tmp.put_u8(self.count);
31611        __tmp.put_u8(self.mavtype as u8);
31612        for val in &self.name {
31613            __tmp.put_u8(*val);
31614        }
31615        for val in &self.uri {
31616            __tmp.put_u8(*val);
31617        }
31618        if matches!(version, MavlinkVersion::V2) {
31619            __tmp.put_u8(self.encoding as u8);
31620            __tmp.put_u8(self.camera_device_id);
31621            let len = __tmp.len();
31622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31623        } else {
31624            __tmp.len()
31625        }
31626    }
31627}
31628#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31629#[doc = ""]
31630#[doc = "ID: 270"]
31631#[derive(Debug, Clone, PartialEq)]
31632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31634#[cfg_attr(feature = "ts", derive(TS))]
31635#[cfg_attr(feature = "ts", ts(export))]
31636pub struct VIDEO_STREAM_STATUS_DATA {
31637    #[doc = "Frame rate"]
31638    pub framerate: f32,
31639    #[doc = "Bit rate"]
31640    pub bitrate: u32,
31641    #[doc = "Bitmap of stream status flags"]
31642    pub flags: VideoStreamStatusFlags,
31643    #[doc = "Horizontal resolution"]
31644    pub resolution_h: u16,
31645    #[doc = "Vertical resolution"]
31646    pub resolution_v: u16,
31647    #[doc = "Video image rotation clockwise"]
31648    pub rotation: u16,
31649    #[doc = "Horizontal Field of view"]
31650    pub hfov: u16,
31651    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31652    pub stream_id: u8,
31653    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31654    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31655    pub camera_device_id: u8,
31656}
31657impl VIDEO_STREAM_STATUS_DATA {
31658    pub const ENCODED_LEN: usize = 20usize;
31659    pub const DEFAULT: Self = Self {
31660        framerate: 0.0_f32,
31661        bitrate: 0_u32,
31662        flags: VideoStreamStatusFlags::DEFAULT,
31663        resolution_h: 0_u16,
31664        resolution_v: 0_u16,
31665        rotation: 0_u16,
31666        hfov: 0_u16,
31667        stream_id: 0_u8,
31668        camera_device_id: 0_u8,
31669    };
31670    #[cfg(feature = "arbitrary")]
31671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31672        use arbitrary::{Arbitrary, Unstructured};
31673        let mut buf = [0u8; 1024];
31674        rng.fill_bytes(&mut buf);
31675        let mut unstructured = Unstructured::new(&buf);
31676        Self::arbitrary(&mut unstructured).unwrap_or_default()
31677    }
31678}
31679impl Default for VIDEO_STREAM_STATUS_DATA {
31680    fn default() -> Self {
31681        Self::DEFAULT.clone()
31682    }
31683}
31684impl MessageData for VIDEO_STREAM_STATUS_DATA {
31685    type Message = MavMessage;
31686    const ID: u32 = 270u32;
31687    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31688    const EXTRA_CRC: u8 = 59u8;
31689    const ENCODED_LEN: usize = 20usize;
31690    fn deser(
31691        _version: MavlinkVersion,
31692        __input: &[u8],
31693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31694        let avail_len = __input.len();
31695        let mut payload_buf = [0; Self::ENCODED_LEN];
31696        let mut buf = if avail_len < Self::ENCODED_LEN {
31697            payload_buf[0..avail_len].copy_from_slice(__input);
31698            Bytes::new(&payload_buf)
31699        } else {
31700            Bytes::new(__input)
31701        };
31702        let mut __struct = Self::default();
31703        __struct.framerate = buf.get_f32_le();
31704        __struct.bitrate = buf.get_u32_le();
31705        let tmp = buf.get_u16_le();
31706        __struct.flags = VideoStreamStatusFlags::from_bits(
31707            tmp & VideoStreamStatusFlags::all().bits(),
31708        )
31709        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31710            flag_type: "VideoStreamStatusFlags",
31711            value: tmp as u32,
31712        })?;
31713        __struct.resolution_h = buf.get_u16_le();
31714        __struct.resolution_v = buf.get_u16_le();
31715        __struct.rotation = buf.get_u16_le();
31716        __struct.hfov = buf.get_u16_le();
31717        __struct.stream_id = buf.get_u8();
31718        __struct.camera_device_id = buf.get_u8();
31719        Ok(__struct)
31720    }
31721    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31722        let mut __tmp = BytesMut::new(bytes);
31723        #[allow(clippy::absurd_extreme_comparisons)]
31724        #[allow(unused_comparisons)]
31725        if __tmp.remaining() < Self::ENCODED_LEN {
31726            panic!(
31727                "buffer is too small (need {} bytes, but got {})",
31728                Self::ENCODED_LEN,
31729                __tmp.remaining(),
31730            )
31731        }
31732        __tmp.put_f32_le(self.framerate);
31733        __tmp.put_u32_le(self.bitrate);
31734        __tmp.put_u16_le(self.flags.bits());
31735        __tmp.put_u16_le(self.resolution_h);
31736        __tmp.put_u16_le(self.resolution_v);
31737        __tmp.put_u16_le(self.rotation);
31738        __tmp.put_u16_le(self.hfov);
31739        __tmp.put_u8(self.stream_id);
31740        if matches!(version, MavlinkVersion::V2) {
31741            __tmp.put_u8(self.camera_device_id);
31742            let len = __tmp.len();
31743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31744        } else {
31745            __tmp.len()
31746        }
31747    }
31748}
31749#[doc = "Local position/attitude estimate from a vision source."]
31750#[doc = ""]
31751#[doc = "ID: 102"]
31752#[derive(Debug, Clone, PartialEq)]
31753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31755#[cfg_attr(feature = "ts", derive(TS))]
31756#[cfg_attr(feature = "ts", ts(export))]
31757pub struct VISION_POSITION_ESTIMATE_DATA {
31758    #[doc = "Timestamp (UNIX time or time since system boot)"]
31759    pub usec: u64,
31760    #[doc = "Local X position"]
31761    pub x: f32,
31762    #[doc = "Local Y position"]
31763    pub y: f32,
31764    #[doc = "Local Z position"]
31765    pub z: f32,
31766    #[doc = "Roll angle"]
31767    pub roll: f32,
31768    #[doc = "Pitch angle"]
31769    pub pitch: f32,
31770    #[doc = "Yaw angle"]
31771    pub yaw: f32,
31772    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31773    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31776    pub covariance: [f32; 21],
31777    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31778    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31779    pub reset_counter: u8,
31780}
31781impl VISION_POSITION_ESTIMATE_DATA {
31782    pub const ENCODED_LEN: usize = 117usize;
31783    pub const DEFAULT: Self = Self {
31784        usec: 0_u64,
31785        x: 0.0_f32,
31786        y: 0.0_f32,
31787        z: 0.0_f32,
31788        roll: 0.0_f32,
31789        pitch: 0.0_f32,
31790        yaw: 0.0_f32,
31791        covariance: [0.0_f32; 21usize],
31792        reset_counter: 0_u8,
31793    };
31794    #[cfg(feature = "arbitrary")]
31795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31796        use arbitrary::{Arbitrary, Unstructured};
31797        let mut buf = [0u8; 1024];
31798        rng.fill_bytes(&mut buf);
31799        let mut unstructured = Unstructured::new(&buf);
31800        Self::arbitrary(&mut unstructured).unwrap_or_default()
31801    }
31802}
31803impl Default for VISION_POSITION_ESTIMATE_DATA {
31804    fn default() -> Self {
31805        Self::DEFAULT.clone()
31806    }
31807}
31808impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31809    type Message = MavMessage;
31810    const ID: u32 = 102u32;
31811    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31812    const EXTRA_CRC: u8 = 158u8;
31813    const ENCODED_LEN: usize = 117usize;
31814    fn deser(
31815        _version: MavlinkVersion,
31816        __input: &[u8],
31817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31818        let avail_len = __input.len();
31819        let mut payload_buf = [0; Self::ENCODED_LEN];
31820        let mut buf = if avail_len < Self::ENCODED_LEN {
31821            payload_buf[0..avail_len].copy_from_slice(__input);
31822            Bytes::new(&payload_buf)
31823        } else {
31824            Bytes::new(__input)
31825        };
31826        let mut __struct = Self::default();
31827        __struct.usec = buf.get_u64_le();
31828        __struct.x = buf.get_f32_le();
31829        __struct.y = buf.get_f32_le();
31830        __struct.z = buf.get_f32_le();
31831        __struct.roll = buf.get_f32_le();
31832        __struct.pitch = buf.get_f32_le();
31833        __struct.yaw = buf.get_f32_le();
31834        for v in &mut __struct.covariance {
31835            let val = buf.get_f32_le();
31836            *v = val;
31837        }
31838        __struct.reset_counter = buf.get_u8();
31839        Ok(__struct)
31840    }
31841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31842        let mut __tmp = BytesMut::new(bytes);
31843        #[allow(clippy::absurd_extreme_comparisons)]
31844        #[allow(unused_comparisons)]
31845        if __tmp.remaining() < Self::ENCODED_LEN {
31846            panic!(
31847                "buffer is too small (need {} bytes, but got {})",
31848                Self::ENCODED_LEN,
31849                __tmp.remaining(),
31850            )
31851        }
31852        __tmp.put_u64_le(self.usec);
31853        __tmp.put_f32_le(self.x);
31854        __tmp.put_f32_le(self.y);
31855        __tmp.put_f32_le(self.z);
31856        __tmp.put_f32_le(self.roll);
31857        __tmp.put_f32_le(self.pitch);
31858        __tmp.put_f32_le(self.yaw);
31859        if matches!(version, MavlinkVersion::V2) {
31860            for val in &self.covariance {
31861                __tmp.put_f32_le(*val);
31862            }
31863            __tmp.put_u8(self.reset_counter);
31864            let len = __tmp.len();
31865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31866        } else {
31867            __tmp.len()
31868        }
31869    }
31870}
31871#[doc = "Speed estimate from a vision source."]
31872#[doc = ""]
31873#[doc = "ID: 103"]
31874#[derive(Debug, Clone, PartialEq)]
31875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31877#[cfg_attr(feature = "ts", derive(TS))]
31878#[cfg_attr(feature = "ts", ts(export))]
31879pub struct VISION_SPEED_ESTIMATE_DATA {
31880    #[doc = "Timestamp (UNIX time or time since system boot)"]
31881    pub usec: u64,
31882    #[doc = "Global X speed"]
31883    pub x: f32,
31884    #[doc = "Global Y speed"]
31885    pub y: f32,
31886    #[doc = "Global Z speed"]
31887    pub z: f32,
31888    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31891    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31892    pub covariance: [f32; 9],
31893    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31894    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31895    pub reset_counter: u8,
31896}
31897impl VISION_SPEED_ESTIMATE_DATA {
31898    pub const ENCODED_LEN: usize = 57usize;
31899    pub const DEFAULT: Self = Self {
31900        usec: 0_u64,
31901        x: 0.0_f32,
31902        y: 0.0_f32,
31903        z: 0.0_f32,
31904        covariance: [0.0_f32; 9usize],
31905        reset_counter: 0_u8,
31906    };
31907    #[cfg(feature = "arbitrary")]
31908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31909        use arbitrary::{Arbitrary, Unstructured};
31910        let mut buf = [0u8; 1024];
31911        rng.fill_bytes(&mut buf);
31912        let mut unstructured = Unstructured::new(&buf);
31913        Self::arbitrary(&mut unstructured).unwrap_or_default()
31914    }
31915}
31916impl Default for VISION_SPEED_ESTIMATE_DATA {
31917    fn default() -> Self {
31918        Self::DEFAULT.clone()
31919    }
31920}
31921impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31922    type Message = MavMessage;
31923    const ID: u32 = 103u32;
31924    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
31925    const EXTRA_CRC: u8 = 208u8;
31926    const ENCODED_LEN: usize = 57usize;
31927    fn deser(
31928        _version: MavlinkVersion,
31929        __input: &[u8],
31930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31931        let avail_len = __input.len();
31932        let mut payload_buf = [0; Self::ENCODED_LEN];
31933        let mut buf = if avail_len < Self::ENCODED_LEN {
31934            payload_buf[0..avail_len].copy_from_slice(__input);
31935            Bytes::new(&payload_buf)
31936        } else {
31937            Bytes::new(__input)
31938        };
31939        let mut __struct = Self::default();
31940        __struct.usec = buf.get_u64_le();
31941        __struct.x = buf.get_f32_le();
31942        __struct.y = buf.get_f32_le();
31943        __struct.z = buf.get_f32_le();
31944        for v in &mut __struct.covariance {
31945            let val = buf.get_f32_le();
31946            *v = val;
31947        }
31948        __struct.reset_counter = buf.get_u8();
31949        Ok(__struct)
31950    }
31951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31952        let mut __tmp = BytesMut::new(bytes);
31953        #[allow(clippy::absurd_extreme_comparisons)]
31954        #[allow(unused_comparisons)]
31955        if __tmp.remaining() < Self::ENCODED_LEN {
31956            panic!(
31957                "buffer is too small (need {} bytes, but got {})",
31958                Self::ENCODED_LEN,
31959                __tmp.remaining(),
31960            )
31961        }
31962        __tmp.put_u64_le(self.usec);
31963        __tmp.put_f32_le(self.x);
31964        __tmp.put_f32_le(self.y);
31965        __tmp.put_f32_le(self.z);
31966        if matches!(version, MavlinkVersion::V2) {
31967            for val in &self.covariance {
31968                __tmp.put_f32_le(*val);
31969            }
31970            __tmp.put_u8(self.reset_counter);
31971            let len = __tmp.len();
31972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31973        } else {
31974            __tmp.len()
31975        }
31976    }
31977}
31978#[doc = "Cumulative distance traveled for each reported wheel."]
31979#[doc = ""]
31980#[doc = "ID: 9000"]
31981#[derive(Debug, Clone, PartialEq)]
31982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31984#[cfg_attr(feature = "ts", derive(TS))]
31985#[cfg_attr(feature = "ts", ts(export))]
31986pub struct WHEEL_DISTANCE_DATA {
31987    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31988    pub time_usec: u64,
31989    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
31990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31991    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31992    pub distance: [f64; 16],
31993    #[doc = "Number of wheels reported."]
31994    pub count: u8,
31995}
31996impl WHEEL_DISTANCE_DATA {
31997    pub const ENCODED_LEN: usize = 137usize;
31998    pub const DEFAULT: Self = Self {
31999        time_usec: 0_u64,
32000        distance: [0.0_f64; 16usize],
32001        count: 0_u8,
32002    };
32003    #[cfg(feature = "arbitrary")]
32004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32005        use arbitrary::{Arbitrary, Unstructured};
32006        let mut buf = [0u8; 1024];
32007        rng.fill_bytes(&mut buf);
32008        let mut unstructured = Unstructured::new(&buf);
32009        Self::arbitrary(&mut unstructured).unwrap_or_default()
32010    }
32011}
32012impl Default for WHEEL_DISTANCE_DATA {
32013    fn default() -> Self {
32014        Self::DEFAULT.clone()
32015    }
32016}
32017impl MessageData for WHEEL_DISTANCE_DATA {
32018    type Message = MavMessage;
32019    const ID: u32 = 9000u32;
32020    const NAME: &'static str = "WHEEL_DISTANCE";
32021    const EXTRA_CRC: u8 = 113u8;
32022    const ENCODED_LEN: usize = 137usize;
32023    fn deser(
32024        _version: MavlinkVersion,
32025        __input: &[u8],
32026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32027        let avail_len = __input.len();
32028        let mut payload_buf = [0; Self::ENCODED_LEN];
32029        let mut buf = if avail_len < Self::ENCODED_LEN {
32030            payload_buf[0..avail_len].copy_from_slice(__input);
32031            Bytes::new(&payload_buf)
32032        } else {
32033            Bytes::new(__input)
32034        };
32035        let mut __struct = Self::default();
32036        __struct.time_usec = buf.get_u64_le();
32037        for v in &mut __struct.distance {
32038            let val = buf.get_f64_le();
32039            *v = val;
32040        }
32041        __struct.count = buf.get_u8();
32042        Ok(__struct)
32043    }
32044    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32045        let mut __tmp = BytesMut::new(bytes);
32046        #[allow(clippy::absurd_extreme_comparisons)]
32047        #[allow(unused_comparisons)]
32048        if __tmp.remaining() < Self::ENCODED_LEN {
32049            panic!(
32050                "buffer is too small (need {} bytes, but got {})",
32051                Self::ENCODED_LEN,
32052                __tmp.remaining(),
32053            )
32054        }
32055        __tmp.put_u64_le(self.time_usec);
32056        for val in &self.distance {
32057            __tmp.put_f64_le(*val);
32058        }
32059        __tmp.put_u8(self.count);
32060        if matches!(version, MavlinkVersion::V2) {
32061            let len = __tmp.len();
32062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32063        } else {
32064            __tmp.len()
32065        }
32066    }
32067}
32068#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32069#[doc = ""]
32070#[doc = "ID: 299"]
32071#[derive(Debug, Clone, PartialEq)]
32072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32074#[cfg_attr(feature = "ts", derive(TS))]
32075#[cfg_attr(feature = "ts", ts(export))]
32076pub struct WIFI_CONFIG_AP_DATA {
32077    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32078    #[cfg_attr(
32079        feature = "serde",
32080        serde(
32081            serialize_with = "crate::nulstr::serialize::<_, 32>",
32082            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
32083        )
32084    )]
32085    #[cfg_attr(feature = "ts", ts(type = "string"))]
32086    pub ssid: [u8; 32],
32087    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32088    #[cfg_attr(
32089        feature = "serde",
32090        serde(
32091            serialize_with = "crate::nulstr::serialize::<_, 64>",
32092            deserialize_with = "crate::nulstr::deserialize::<_, 64>"
32093        )
32094    )]
32095    #[cfg_attr(feature = "ts", ts(type = "string"))]
32096    pub password: [u8; 64],
32097    #[doc = "WiFi Mode."]
32098    #[cfg_attr(feature = "serde", serde(default))]
32099    pub mode: WifiConfigApMode,
32100    #[doc = "Message acceptance response (sent back to GS)."]
32101    #[cfg_attr(feature = "serde", serde(default))]
32102    pub response: WifiConfigApResponse,
32103}
32104impl WIFI_CONFIG_AP_DATA {
32105    pub const ENCODED_LEN: usize = 98usize;
32106    pub const DEFAULT: Self = Self {
32107        ssid: [0_u8; 32usize],
32108        password: [0_u8; 64usize],
32109        mode: WifiConfigApMode::DEFAULT,
32110        response: WifiConfigApResponse::DEFAULT,
32111    };
32112    #[cfg(feature = "arbitrary")]
32113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32114        use arbitrary::{Arbitrary, Unstructured};
32115        let mut buf = [0u8; 1024];
32116        rng.fill_bytes(&mut buf);
32117        let mut unstructured = Unstructured::new(&buf);
32118        Self::arbitrary(&mut unstructured).unwrap_or_default()
32119    }
32120}
32121impl Default for WIFI_CONFIG_AP_DATA {
32122    fn default() -> Self {
32123        Self::DEFAULT.clone()
32124    }
32125}
32126impl MessageData for WIFI_CONFIG_AP_DATA {
32127    type Message = MavMessage;
32128    const ID: u32 = 299u32;
32129    const NAME: &'static str = "WIFI_CONFIG_AP";
32130    const EXTRA_CRC: u8 = 19u8;
32131    const ENCODED_LEN: usize = 98usize;
32132    fn deser(
32133        _version: MavlinkVersion,
32134        __input: &[u8],
32135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32136        let avail_len = __input.len();
32137        let mut payload_buf = [0; Self::ENCODED_LEN];
32138        let mut buf = if avail_len < Self::ENCODED_LEN {
32139            payload_buf[0..avail_len].copy_from_slice(__input);
32140            Bytes::new(&payload_buf)
32141        } else {
32142            Bytes::new(__input)
32143        };
32144        let mut __struct = Self::default();
32145        for v in &mut __struct.ssid {
32146            let val = buf.get_u8();
32147            *v = val;
32148        }
32149        for v in &mut __struct.password {
32150            let val = buf.get_u8();
32151            *v = val;
32152        }
32153        let tmp = buf.get_i8();
32154        __struct.mode =
32155            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32156                enum_type: "WifiConfigApMode",
32157                value: tmp as u32,
32158            })?;
32159        let tmp = buf.get_i8();
32160        __struct.response =
32161            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32162                enum_type: "WifiConfigApResponse",
32163                value: tmp as u32,
32164            })?;
32165        Ok(__struct)
32166    }
32167    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32168        let mut __tmp = BytesMut::new(bytes);
32169        #[allow(clippy::absurd_extreme_comparisons)]
32170        #[allow(unused_comparisons)]
32171        if __tmp.remaining() < Self::ENCODED_LEN {
32172            panic!(
32173                "buffer is too small (need {} bytes, but got {})",
32174                Self::ENCODED_LEN,
32175                __tmp.remaining(),
32176            )
32177        }
32178        for val in &self.ssid {
32179            __tmp.put_u8(*val);
32180        }
32181        for val in &self.password {
32182            __tmp.put_u8(*val);
32183        }
32184        if matches!(version, MavlinkVersion::V2) {
32185            __tmp.put_i8(self.mode as i8);
32186            __tmp.put_i8(self.response as i8);
32187            let len = __tmp.len();
32188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32189        } else {
32190            __tmp.len()
32191        }
32192    }
32193}
32194#[doc = "Winch status."]
32195#[doc = ""]
32196#[doc = "ID: 9005"]
32197#[derive(Debug, Clone, PartialEq)]
32198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32200#[cfg_attr(feature = "ts", derive(TS))]
32201#[cfg_attr(feature = "ts", ts(export))]
32202pub struct WINCH_STATUS_DATA {
32203    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32204    pub time_usec: u64,
32205    #[doc = "Length of line released. NaN if unknown"]
32206    pub line_length: f32,
32207    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32208    pub speed: f32,
32209    #[doc = "Tension on the line. NaN if unknown"]
32210    pub tension: f32,
32211    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32212    pub voltage: f32,
32213    #[doc = "Current draw from the winch. NaN if unknown"]
32214    pub current: f32,
32215    #[doc = "Status flags"]
32216    pub status: MavWinchStatusFlag,
32217    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32218    pub temperature: i16,
32219}
32220impl WINCH_STATUS_DATA {
32221    pub const ENCODED_LEN: usize = 34usize;
32222    pub const DEFAULT: Self = Self {
32223        time_usec: 0_u64,
32224        line_length: 0.0_f32,
32225        speed: 0.0_f32,
32226        tension: 0.0_f32,
32227        voltage: 0.0_f32,
32228        current: 0.0_f32,
32229        status: MavWinchStatusFlag::DEFAULT,
32230        temperature: 0_i16,
32231    };
32232    #[cfg(feature = "arbitrary")]
32233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32234        use arbitrary::{Arbitrary, Unstructured};
32235        let mut buf = [0u8; 1024];
32236        rng.fill_bytes(&mut buf);
32237        let mut unstructured = Unstructured::new(&buf);
32238        Self::arbitrary(&mut unstructured).unwrap_or_default()
32239    }
32240}
32241impl Default for WINCH_STATUS_DATA {
32242    fn default() -> Self {
32243        Self::DEFAULT.clone()
32244    }
32245}
32246impl MessageData for WINCH_STATUS_DATA {
32247    type Message = MavMessage;
32248    const ID: u32 = 9005u32;
32249    const NAME: &'static str = "WINCH_STATUS";
32250    const EXTRA_CRC: u8 = 117u8;
32251    const ENCODED_LEN: usize = 34usize;
32252    fn deser(
32253        _version: MavlinkVersion,
32254        __input: &[u8],
32255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32256        let avail_len = __input.len();
32257        let mut payload_buf = [0; Self::ENCODED_LEN];
32258        let mut buf = if avail_len < Self::ENCODED_LEN {
32259            payload_buf[0..avail_len].copy_from_slice(__input);
32260            Bytes::new(&payload_buf)
32261        } else {
32262            Bytes::new(__input)
32263        };
32264        let mut __struct = Self::default();
32265        __struct.time_usec = buf.get_u64_le();
32266        __struct.line_length = buf.get_f32_le();
32267        __struct.speed = buf.get_f32_le();
32268        __struct.tension = buf.get_f32_le();
32269        __struct.voltage = buf.get_f32_le();
32270        __struct.current = buf.get_f32_le();
32271        let tmp = buf.get_u32_le();
32272        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
32273            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32274                flag_type: "MavWinchStatusFlag",
32275                value: tmp as u32,
32276            })?;
32277        __struct.temperature = buf.get_i16_le();
32278        Ok(__struct)
32279    }
32280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32281        let mut __tmp = BytesMut::new(bytes);
32282        #[allow(clippy::absurd_extreme_comparisons)]
32283        #[allow(unused_comparisons)]
32284        if __tmp.remaining() < Self::ENCODED_LEN {
32285            panic!(
32286                "buffer is too small (need {} bytes, but got {})",
32287                Self::ENCODED_LEN,
32288                __tmp.remaining(),
32289            )
32290        }
32291        __tmp.put_u64_le(self.time_usec);
32292        __tmp.put_f32_le(self.line_length);
32293        __tmp.put_f32_le(self.speed);
32294        __tmp.put_f32_le(self.tension);
32295        __tmp.put_f32_le(self.voltage);
32296        __tmp.put_f32_le(self.current);
32297        __tmp.put_u32_le(self.status.bits());
32298        __tmp.put_i16_le(self.temperature);
32299        if matches!(version, MavlinkVersion::V2) {
32300            let len = __tmp.len();
32301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32302        } else {
32303            __tmp.len()
32304        }
32305    }
32306}
32307#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32308#[doc = ""]
32309#[doc = "ID: 231"]
32310#[derive(Debug, Clone, PartialEq)]
32311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32313#[cfg_attr(feature = "ts", derive(TS))]
32314#[cfg_attr(feature = "ts", ts(export))]
32315pub struct WIND_COV_DATA {
32316    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32317    pub time_usec: u64,
32318    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32319    pub wind_x: f32,
32320    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32321    pub wind_y: f32,
32322    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32323    pub wind_z: f32,
32324    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32325    pub var_horiz: f32,
32326    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32327    pub var_vert: f32,
32328    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32329    pub wind_alt: f32,
32330    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32331    pub horiz_accuracy: f32,
32332    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32333    pub vert_accuracy: f32,
32334}
32335impl WIND_COV_DATA {
32336    pub const ENCODED_LEN: usize = 40usize;
32337    pub const DEFAULT: Self = Self {
32338        time_usec: 0_u64,
32339        wind_x: 0.0_f32,
32340        wind_y: 0.0_f32,
32341        wind_z: 0.0_f32,
32342        var_horiz: 0.0_f32,
32343        var_vert: 0.0_f32,
32344        wind_alt: 0.0_f32,
32345        horiz_accuracy: 0.0_f32,
32346        vert_accuracy: 0.0_f32,
32347    };
32348    #[cfg(feature = "arbitrary")]
32349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32350        use arbitrary::{Arbitrary, Unstructured};
32351        let mut buf = [0u8; 1024];
32352        rng.fill_bytes(&mut buf);
32353        let mut unstructured = Unstructured::new(&buf);
32354        Self::arbitrary(&mut unstructured).unwrap_or_default()
32355    }
32356}
32357impl Default for WIND_COV_DATA {
32358    fn default() -> Self {
32359        Self::DEFAULT.clone()
32360    }
32361}
32362impl MessageData for WIND_COV_DATA {
32363    type Message = MavMessage;
32364    const ID: u32 = 231u32;
32365    const NAME: &'static str = "WIND_COV";
32366    const EXTRA_CRC: u8 = 105u8;
32367    const ENCODED_LEN: usize = 40usize;
32368    fn deser(
32369        _version: MavlinkVersion,
32370        __input: &[u8],
32371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32372        let avail_len = __input.len();
32373        let mut payload_buf = [0; Self::ENCODED_LEN];
32374        let mut buf = if avail_len < Self::ENCODED_LEN {
32375            payload_buf[0..avail_len].copy_from_slice(__input);
32376            Bytes::new(&payload_buf)
32377        } else {
32378            Bytes::new(__input)
32379        };
32380        let mut __struct = Self::default();
32381        __struct.time_usec = buf.get_u64_le();
32382        __struct.wind_x = buf.get_f32_le();
32383        __struct.wind_y = buf.get_f32_le();
32384        __struct.wind_z = buf.get_f32_le();
32385        __struct.var_horiz = buf.get_f32_le();
32386        __struct.var_vert = buf.get_f32_le();
32387        __struct.wind_alt = buf.get_f32_le();
32388        __struct.horiz_accuracy = buf.get_f32_le();
32389        __struct.vert_accuracy = buf.get_f32_le();
32390        Ok(__struct)
32391    }
32392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32393        let mut __tmp = BytesMut::new(bytes);
32394        #[allow(clippy::absurd_extreme_comparisons)]
32395        #[allow(unused_comparisons)]
32396        if __tmp.remaining() < Self::ENCODED_LEN {
32397            panic!(
32398                "buffer is too small (need {} bytes, but got {})",
32399                Self::ENCODED_LEN,
32400                __tmp.remaining(),
32401            )
32402        }
32403        __tmp.put_u64_le(self.time_usec);
32404        __tmp.put_f32_le(self.wind_x);
32405        __tmp.put_f32_le(self.wind_y);
32406        __tmp.put_f32_le(self.wind_z);
32407        __tmp.put_f32_le(self.var_horiz);
32408        __tmp.put_f32_le(self.var_vert);
32409        __tmp.put_f32_le(self.wind_alt);
32410        __tmp.put_f32_le(self.horiz_accuracy);
32411        __tmp.put_f32_le(self.vert_accuracy);
32412        if matches!(version, MavlinkVersion::V2) {
32413            let len = __tmp.len();
32414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32415        } else {
32416            __tmp.len()
32417        }
32418    }
32419}
32420#[derive(Clone, PartialEq, Debug)]
32421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32422#[cfg_attr(feature = "serde", serde(tag = "type"))]
32423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32424#[cfg_attr(feature = "ts", derive(TS))]
32425#[cfg_attr(feature = "ts", ts(export))]
32426#[repr(u32)]
32427pub enum MavMessage {
32428    #[doc = "Set the vehicle attitude and body angular rates."]
32429    #[doc = ""]
32430    #[doc = "ID: 140"]
32431    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32432    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32433    #[doc = ""]
32434    #[doc = "ID: 375"]
32435    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32436    #[doc = "The location and information of an ADSB vehicle."]
32437    #[doc = ""]
32438    #[doc = "ID: 246"]
32439    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32440    #[doc = "The location and information of an AIS vessel."]
32441    #[doc = ""]
32442    #[doc = "ID: 301"]
32443    AIS_VESSEL(AIS_VESSEL_DATA),
32444    #[doc = "The current system altitude."]
32445    #[doc = ""]
32446    #[doc = "ID: 141"]
32447    ALTITUDE(ALTITUDE_DATA),
32448    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32449    #[doc = ""]
32450    #[doc = "ID: 30"]
32451    ATTITUDE(ATTITUDE_DATA),
32452    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32453    #[doc = ""]
32454    #[doc = "ID: 31"]
32455    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32456    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32457    #[doc = ""]
32458    #[doc = "ID: 61"]
32459    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32460    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32461    #[doc = ""]
32462    #[doc = "ID: 83"]
32463    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32464    #[doc = "Motion capture attitude and position."]
32465    #[doc = ""]
32466    #[doc = "ID: 138"]
32467    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32468    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32469    #[doc = ""]
32470    #[doc = "ID: 7"]
32471    AUTH_KEY(AUTH_KEY_DATA),
32472    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32473    #[doc = ""]
32474    #[doc = "ID: 286"]
32475    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32476    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32477    #[doc = ""]
32478    #[doc = "ID: 148"]
32479    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32480    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32481    #[doc = ""]
32482    #[doc = "ID: 435"]
32483    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32484    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32485    #[doc = ""]
32486    #[doc = "ID: 437"]
32487    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32488    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32489    #[doc = ""]
32490    #[doc = "ID: 372"]
32491    BATTERY_INFO(BATTERY_INFO_DATA),
32492    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32493    #[doc = ""]
32494    #[doc = "ID: 147"]
32495    BATTERY_STATUS(BATTERY_STATUS_DATA),
32496    #[doc = "Report button state change."]
32497    #[doc = ""]
32498    #[doc = "ID: 257"]
32499    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32500    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32501    #[doc = ""]
32502    #[doc = "ID: 262"]
32503    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32504    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32505    #[doc = ""]
32506    #[doc = "ID: 271"]
32507    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32508    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32509    #[doc = ""]
32510    #[doc = "ID: 263"]
32511    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32512    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32513    #[doc = ""]
32514    #[doc = "ID: 259"]
32515    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32516    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32517    #[doc = ""]
32518    #[doc = "ID: 260"]
32519    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32520    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32521    #[doc = ""]
32522    #[doc = "ID: 277"]
32523    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32524    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32525    #[doc = ""]
32526    #[doc = "ID: 276"]
32527    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32528    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32529    #[doc = ""]
32530    #[doc = "ID: 275"]
32531    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32532    #[doc = "Camera-IMU triggering and synchronisation message."]
32533    #[doc = ""]
32534    #[doc = "ID: 112"]
32535    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32536    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32537    #[doc = ""]
32538    #[doc = "ID: 387"]
32539    CANFD_FRAME(CANFD_FRAME_DATA),
32540    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32541    #[doc = ""]
32542    #[doc = "ID: 388"]
32543    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32544    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32545    #[doc = ""]
32546    #[doc = "ID: 386"]
32547    CAN_FRAME(CAN_FRAME_DATA),
32548    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32549    #[doc = ""]
32550    #[doc = "ID: 336"]
32551    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32552    #[doc = "Report current used cellular network status."]
32553    #[doc = ""]
32554    #[doc = "ID: 334"]
32555    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32556    #[doc = "Request to control this MAV."]
32557    #[doc = ""]
32558    #[doc = "ID: 5"]
32559    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32560    #[doc = "Accept / deny control of this MAV."]
32561    #[doc = ""]
32562    #[doc = "ID: 6"]
32563    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32564    #[doc = "Information about a potential collision."]
32565    #[doc = ""]
32566    #[doc = "ID: 247"]
32567    COLLISION(COLLISION_DATA),
32568    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32569    #[doc = ""]
32570    #[doc = "ID: 77"]
32571    COMMAND_ACK(COMMAND_ACK_DATA),
32572    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32573    #[doc = ""]
32574    #[doc = "ID: 80"]
32575    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32576    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32577    #[doc = ""]
32578    #[doc = "ID: 75"]
32579    COMMAND_INT(COMMAND_INT_DATA),
32580    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32581    #[doc = ""]
32582    #[doc = "ID: 76"]
32583    COMMAND_LONG(COMMAND_LONG_DATA),
32584    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32585    #[doc = ""]
32586    #[doc = "ID: 395"]
32587    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32588    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32589    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32590    #[doc = ""]
32591    #[doc = "ID: 396"]
32592    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32593    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32594    #[doc = ""]
32595    #[doc = "ID: 397"]
32596    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32597    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32598    #[doc = ""]
32599    #[doc = "ID: 146"]
32600    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32601    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32602    #[doc = ""]
32603    #[doc = "ID: 411"]
32604    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32605    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32606    #[doc = ""]
32607    #[doc = "ID: 436"]
32608    CURRENT_MODE(CURRENT_MODE_DATA),
32609    #[doc = "Data stream status information."]
32610    #[doc = ""]
32611    #[doc = "ID: 67"]
32612    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32613    DATA_STREAM(DATA_STREAM_DATA),
32614    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32615    #[doc = ""]
32616    #[doc = "ID: 130"]
32617    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32618    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32619    #[doc = ""]
32620    #[doc = "ID: 254"]
32621    DEBUG(DEBUG_DATA),
32622    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32623    #[doc = ""]
32624    #[doc = "ID: 350"]
32625    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32626    #[doc = "To debug something using a named 3D vector."]
32627    #[doc = ""]
32628    #[doc = "ID: 250"]
32629    DEBUG_VECT(DEBUG_VECT_DATA),
32630    #[doc = "Distance sensor information for an onboard rangefinder."]
32631    #[doc = ""]
32632    #[doc = "ID: 132"]
32633    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32634    #[doc = "EFI status output."]
32635    #[doc = ""]
32636    #[doc = "ID: 225"]
32637    EFI_STATUS(EFI_STATUS_DATA),
32638    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32639    #[doc = ""]
32640    #[doc = "ID: 131"]
32641    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32642    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32643    #[doc = ""]
32644    #[doc = "ID: 290"]
32645    ESC_INFO(ESC_INFO_DATA),
32646    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32647    #[doc = ""]
32648    #[doc = "ID: 291"]
32649    ESC_STATUS(ESC_STATUS_DATA),
32650    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32651    #[doc = ""]
32652    #[doc = "ID: 230"]
32653    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32654    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32655    #[doc = ""]
32656    #[doc = "ID: 410"]
32657    EVENT(EVENT_DATA),
32658    #[doc = "Provides state for additional features."]
32659    #[doc = ""]
32660    #[doc = "ID: 245"]
32661    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32662    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32663    #[doc = ""]
32664    #[doc = "ID: 162"]
32665    FENCE_STATUS(FENCE_STATUS_DATA),
32666    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32667    #[doc = ""]
32668    #[doc = "ID: 110"]
32669    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32670    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32671    #[doc = ""]
32672    #[doc = "ID: 264"]
32673    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32674    #[doc = "Current motion information from a designated system."]
32675    #[doc = ""]
32676    #[doc = "ID: 144"]
32677    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32678    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32679    #[doc = ""]
32680    #[doc = "ID: 371"]
32681    FUEL_STATUS(FUEL_STATUS_DATA),
32682    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32683    #[doc = ""]
32684    #[doc = "ID: 373"]
32685    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32686    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32687    #[doc = ""]
32688    #[doc = "ID: 285"]
32689    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32690    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32691    #[doc = ""]
32692    #[doc = "ID: 283"]
32693    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32694    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32695    #[doc = ""]
32696    #[doc = "ID: 284"]
32697    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32698    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32699    #[doc = ""]
32700    #[doc = "ID: 280"]
32701    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32702    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32703    #[doc = ""]
32704    #[doc = "ID: 282"]
32705    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32706    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32707    #[doc = ""]
32708    #[doc = "ID: 288"]
32709    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32710    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32711    #[doc = ""]
32712    #[doc = "ID: 287"]
32713    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32714    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32715    #[doc = ""]
32716    #[doc = "ID: 281"]
32717    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32718    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32719    #[doc = ""]
32720    #[doc = "ID: 33"]
32721    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32722    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32723    #[doc = ""]
32724    #[doc = "ID: 63"]
32725    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32726    #[doc = "Global position/attitude estimate from a vision source."]
32727    #[doc = ""]
32728    #[doc = "ID: 101"]
32729    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32730    #[doc = "Second GPS data."]
32731    #[doc = ""]
32732    #[doc = "ID: 124"]
32733    GPS2_RAW(GPS2_RAW_DATA),
32734    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32735    #[doc = ""]
32736    #[doc = "ID: 128"]
32737    GPS2_RTK(GPS2_RTK_DATA),
32738    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32739    #[doc = ""]
32740    #[doc = "ID: 49"]
32741    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32742    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32743    #[doc = ""]
32744    #[doc = "ID: 123"]
32745    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32746    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32747    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32748    #[doc = ""]
32749    #[doc = "ID: 232"]
32750    GPS_INPUT(GPS_INPUT_DATA),
32751    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32752    #[doc = ""]
32753    #[doc = "ID: 24"]
32754    GPS_RAW_INT(GPS_RAW_INT_DATA),
32755    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32756    #[doc = ""]
32757    #[doc = "ID: 233"]
32758    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32759    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32760    #[doc = ""]
32761    #[doc = "ID: 127"]
32762    GPS_RTK(GPS_RTK_DATA),
32763    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32764    #[doc = ""]
32765    #[doc = "ID: 25"]
32766    GPS_STATUS(GPS_STATUS_DATA),
32767    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32768    #[doc = ""]
32769    #[doc = "ID: 0"]
32770    HEARTBEAT(HEARTBEAT_DATA),
32771    #[doc = "The IMU readings in SI units in NED body frame."]
32772    #[doc = ""]
32773    #[doc = "ID: 105"]
32774    HIGHRES_IMU(HIGHRES_IMU_DATA),
32775    #[doc = "Message appropriate for high latency connections like Iridium."]
32776    #[doc = ""]
32777    #[doc = "ID: 234"]
32778    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32779    HIGH_LATENCY(HIGH_LATENCY_DATA),
32780    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32781    #[doc = ""]
32782    #[doc = "ID: 235"]
32783    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32784    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32785    #[doc = ""]
32786    #[doc = "ID: 93"]
32787    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32788    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32789    #[doc = ""]
32790    #[doc = "ID: 91"]
32791    HIL_CONTROLS(HIL_CONTROLS_DATA),
32792    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32793    #[doc = ""]
32794    #[doc = "ID: 113"]
32795    HIL_GPS(HIL_GPS_DATA),
32796    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32797    #[doc = ""]
32798    #[doc = "ID: 114"]
32799    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32800    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32801    #[doc = ""]
32802    #[doc = "ID: 92"]
32803    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32804    #[doc = "The IMU readings in SI units in NED body frame."]
32805    #[doc = ""]
32806    #[doc = "ID: 107"]
32807    HIL_SENSOR(HIL_SENSOR_DATA),
32808    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32809    #[doc = ""]
32810    #[doc = "ID: 90"]
32811    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32812    HIL_STATE(HIL_STATE_DATA),
32813    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32814    #[doc = ""]
32815    #[doc = "ID: 115"]
32816    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32817    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32818    #[doc = ""]
32819    #[doc = "ID: 242"]
32820    HOME_POSITION(HOME_POSITION_DATA),
32821    #[doc = "Temperature and humidity from hygrometer."]
32822    #[doc = ""]
32823    #[doc = "ID: 12920"]
32824    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32825    #[doc = "Illuminator status."]
32826    #[doc = ""]
32827    #[doc = "ID: 440"]
32828    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32829    #[doc = "Status of the Iridium SBD link."]
32830    #[doc = ""]
32831    #[doc = "ID: 335"]
32832    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32833    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32834    #[doc = ""]
32835    #[doc = "ID: 149"]
32836    LANDING_TARGET(LANDING_TARGET_DATA),
32837    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32838    #[doc = ""]
32839    #[doc = "ID: 8"]
32840    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32841    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32842    #[doc = ""]
32843    #[doc = "ID: 32"]
32844    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32845    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32846    #[doc = ""]
32847    #[doc = "ID: 64"]
32848    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32849    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32850    #[doc = ""]
32851    #[doc = "ID: 89"]
32852    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32853    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32854    #[doc = ""]
32855    #[doc = "ID: 268"]
32856    LOGGING_ACK(LOGGING_ACK_DATA),
32857    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32858    #[doc = ""]
32859    #[doc = "ID: 266"]
32860    LOGGING_DATA(LOGGING_DATA_DATA),
32861    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32862    #[doc = ""]
32863    #[doc = "ID: 267"]
32864    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32865    #[doc = "Reply to LOG_REQUEST_DATA."]
32866    #[doc = ""]
32867    #[doc = "ID: 120"]
32868    LOG_DATA(LOG_DATA_DATA),
32869    #[doc = "Reply to LOG_REQUEST_LIST."]
32870    #[doc = ""]
32871    #[doc = "ID: 118"]
32872    LOG_ENTRY(LOG_ENTRY_DATA),
32873    #[doc = "Erase all logs."]
32874    #[doc = ""]
32875    #[doc = "ID: 121"]
32876    LOG_ERASE(LOG_ERASE_DATA),
32877    #[doc = "Request a chunk of a log."]
32878    #[doc = ""]
32879    #[doc = "ID: 119"]
32880    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32881    #[doc = "Stop log transfer and resume normal logging."]
32882    #[doc = ""]
32883    #[doc = "ID: 122"]
32884    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32885    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32886    #[doc = ""]
32887    #[doc = "ID: 117"]
32888    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32889    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32890    #[doc = ""]
32891    #[doc = "ID: 192"]
32892    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32893    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32894    #[doc = ""]
32895    #[doc = "ID: 69"]
32896    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32897    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32898    #[doc = ""]
32899    #[doc = "ID: 81"]
32900    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32901    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32902    #[doc = ""]
32903    #[doc = "ID: 249"]
32904    MEMORY_VECT(MEMORY_VECT_DATA),
32905    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32906    #[doc = ""]
32907    #[doc = "ID: 244"]
32908    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32909    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32910    #[doc = ""]
32911    #[doc = "ID: 47"]
32912    MISSION_ACK(MISSION_ACK_DATA),
32913    #[doc = "Delete all mission items at once."]
32914    #[doc = ""]
32915    #[doc = "ID: 45"]
32916    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32917    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32918    #[doc = ""]
32919    #[doc = "ID: 44"]
32920    MISSION_COUNT(MISSION_COUNT_DATA),
32921    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32922    #[doc = ""]
32923    #[doc = "ID: 42"]
32924    MISSION_CURRENT(MISSION_CURRENT_DATA),
32925    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32926    #[doc = ""]
32927    #[doc = "ID: 39"]
32928    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32929    MISSION_ITEM(MISSION_ITEM_DATA),
32930    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32931    #[doc = ""]
32932    #[doc = "ID: 73"]
32933    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
32934    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
32935    #[doc = ""]
32936    #[doc = "ID: 46"]
32937    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
32938    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
32939    #[doc = ""]
32940    #[doc = "ID: 40"]
32941    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
32942    MISSION_REQUEST(MISSION_REQUEST_DATA),
32943    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
32944    #[doc = ""]
32945    #[doc = "ID: 51"]
32946    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
32947    #[doc = "Request the overall list of mission items from the system/component."]
32948    #[doc = ""]
32949    #[doc = "ID: 43"]
32950    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
32951    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
32952    #[doc = ""]
32953    #[doc = "ID: 37"]
32954    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
32955    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
32956    #[doc = ""]
32957    #[doc = "ID: 41"]
32958    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
32959    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
32960    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
32961    #[doc = ""]
32962    #[doc = "ID: 38"]
32963    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
32964    #[doc = "Orientation of a mount."]
32965    #[doc = ""]
32966    #[doc = "ID: 265"]
32967    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
32968    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
32969    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32970    #[doc = ""]
32971    #[doc = "ID: 251"]
32972    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
32973    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32974    #[doc = ""]
32975    #[doc = "ID: 252"]
32976    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
32977    #[doc = "The state of the navigation and position controller."]
32978    #[doc = ""]
32979    #[doc = "ID: 62"]
32980    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
32981    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
32982    #[doc = ""]
32983    #[doc = "ID: 330"]
32984    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
32985    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
32986    #[doc = ""]
32987    #[doc = "ID: 331"]
32988    ODOMETRY(ODOMETRY_DATA),
32989    #[doc = "Hardware status sent by an onboard computer."]
32990    #[doc = ""]
32991    #[doc = "ID: 390"]
32992    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
32993    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
32994    #[doc = ""]
32995    #[doc = "ID: 12918"]
32996    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
32997    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
32998    #[doc = ""]
32999    #[doc = "ID: 12902"]
33000    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33001    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33002    #[doc = ""]
33003    #[doc = "ID: 12900"]
33004    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33005    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33006    #[doc = ""]
33007    #[doc = "ID: 12901"]
33008    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33009    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33010    #[doc = ""]
33011    #[doc = "ID: 12915"]
33012    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33013    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33014    #[doc = ""]
33015    #[doc = "ID: 12905"]
33016    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33017    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33018    #[doc = ""]
33019    #[doc = "ID: 12903"]
33020    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33021    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33022    #[doc = ""]
33023    #[doc = "ID: 12904"]
33024    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33025    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33026    #[doc = ""]
33027    #[doc = "ID: 12919"]
33028    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33029    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33030    #[doc = ""]
33031    #[doc = "ID: 100"]
33032    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33033    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33034    #[doc = ""]
33035    #[doc = "ID: 106"]
33036    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33037    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33038    #[doc = ""]
33039    #[doc = "ID: 360"]
33040    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33041    #[doc = "Response from a PARAM_EXT_SET message."]
33042    #[doc = ""]
33043    #[doc = "ID: 324"]
33044    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33045    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33046    #[doc = ""]
33047    #[doc = "ID: 321"]
33048    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33049    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33050    #[doc = ""]
33051    #[doc = "ID: 320"]
33052    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33053    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33054    #[doc = ""]
33055    #[doc = "ID: 323"]
33056    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33057    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33058    #[doc = ""]
33059    #[doc = "ID: 322"]
33060    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33061    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33062    #[doc = ""]
33063    #[doc = "ID: 50"]
33064    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33065    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33066    #[doc = ""]
33067    #[doc = "ID: 21"]
33068    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33069    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33070    #[doc = ""]
33071    #[doc = "ID: 20"]
33072    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33073    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33074    #[doc = ""]
33075    #[doc = "ID: 23"]
33076    PARAM_SET(PARAM_SET_DATA),
33077    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33078    #[doc = ""]
33079    #[doc = "ID: 22"]
33080    PARAM_VALUE(PARAM_VALUE_DATA),
33081    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33082    #[doc = ""]
33083    #[doc = "ID: 4"]
33084    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33085    PING(PING_DATA),
33086    #[doc = "Control vehicle tone generation (buzzer)."]
33087    #[doc = ""]
33088    #[doc = "ID: 258"]
33089    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33090    PLAY_TUNE(PLAY_TUNE_DATA),
33091    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33092    #[doc = ""]
33093    #[doc = "ID: 400"]
33094    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33095    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33096    #[doc = ""]
33097    #[doc = "ID: 87"]
33098    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33099    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33100    #[doc = ""]
33101    #[doc = "ID: 85"]
33102    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33103    #[doc = "Power supply status."]
33104    #[doc = ""]
33105    #[doc = "ID: 125"]
33106    POWER_STATUS(POWER_STATUS_DATA),
33107    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33108    #[doc = ""]
33109    #[doc = "ID: 300"]
33110    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33111    #[doc = "Status generated by radio and injected into MAVLink stream."]
33112    #[doc = ""]
33113    #[doc = "ID: 109"]
33114    RADIO_STATUS(RADIO_STATUS_DATA),
33115    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33116    #[doc = ""]
33117    #[doc = "ID: 27"]
33118    RAW_IMU(RAW_IMU_DATA),
33119    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33120    #[doc = ""]
33121    #[doc = "ID: 28"]
33122    RAW_PRESSURE(RAW_PRESSURE_DATA),
33123    #[doc = "RPM sensor data message."]
33124    #[doc = ""]
33125    #[doc = "ID: 339"]
33126    RAW_RPM(RAW_RPM_DATA),
33127    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33128    #[doc = ""]
33129    #[doc = "ID: 65"]
33130    RC_CHANNELS(RC_CHANNELS_DATA),
33131    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33132    #[doc = ""]
33133    #[doc = "ID: 70"]
33134    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33135    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33136    #[doc = ""]
33137    #[doc = "ID: 35"]
33138    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33139    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33140    #[doc = ""]
33141    #[doc = "ID: 34"]
33142    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33143    #[doc = "Request a data stream."]
33144    #[doc = ""]
33145    #[doc = "ID: 66"]
33146    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33147    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33148    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33149    #[doc = ""]
33150    #[doc = "ID: 412"]
33151    REQUEST_EVENT(REQUEST_EVENT_DATA),
33152    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33153    #[doc = ""]
33154    #[doc = "ID: 142"]
33155    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33156    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33157    #[doc = ""]
33158    #[doc = "ID: 413"]
33159    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33160    #[doc = "Read out the safety zone the MAV currently assumes."]
33161    #[doc = ""]
33162    #[doc = "ID: 55"]
33163    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33164    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33165    #[doc = ""]
33166    #[doc = "ID: 54"]
33167    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33168    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33169    #[doc = ""]
33170    #[doc = "ID: 26"]
33171    SCALED_IMU(SCALED_IMU_DATA),
33172    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33173    #[doc = ""]
33174    #[doc = "ID: 116"]
33175    SCALED_IMU2(SCALED_IMU2_DATA),
33176    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33177    #[doc = ""]
33178    #[doc = "ID: 129"]
33179    SCALED_IMU3(SCALED_IMU3_DATA),
33180    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33181    #[doc = ""]
33182    #[doc = "ID: 29"]
33183    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33184    #[doc = "Barometer readings for 2nd barometer."]
33185    #[doc = ""]
33186    #[doc = "ID: 137"]
33187    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33188    #[doc = "Barometer readings for 3rd barometer."]
33189    #[doc = ""]
33190    #[doc = "ID: 143"]
33191    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33192    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33193    #[doc = ""]
33194    #[doc = "ID: 126"]
33195    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33196    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33197    #[doc = ""]
33198    #[doc = "ID: 36"]
33199    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33200    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33201    #[doc = ""]
33202    #[doc = "ID: 256"]
33203    SETUP_SIGNING(SETUP_SIGNING_DATA),
33204    #[doc = "Set the vehicle attitude and body angular rates."]
33205    #[doc = ""]
33206    #[doc = "ID: 139"]
33207    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33208    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33209    #[doc = ""]
33210    #[doc = "ID: 82"]
33211    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33212    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33213    #[doc = ""]
33214    #[doc = "ID: 48"]
33215    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33216    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33217    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33218    #[doc = ""]
33219    #[doc = "ID: 243"]
33220    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33221    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33222    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33223    #[doc = ""]
33224    #[doc = "ID: 11"]
33225    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33226    SET_MODE(SET_MODE_DATA),
33227    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33228    #[doc = ""]
33229    #[doc = "ID: 86"]
33230    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33231    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33232    #[doc = ""]
33233    #[doc = "ID: 84"]
33234    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33235    #[doc = "Status of simulation environment, if used."]
33236    #[doc = ""]
33237    #[doc = "ID: 108"]
33238    SIM_STATE(SIM_STATE_DATA),
33239    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33240    #[doc = ""]
33241    #[doc = "ID: 370"]
33242    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33243    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33244    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33245    #[doc = ""]
33246    #[doc = "ID: 253"]
33247    STATUSTEXT(STATUSTEXT_DATA),
33248    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33249    #[doc = ""]
33250    #[doc = "ID: 261"]
33251    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33252    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33253    #[doc = ""]
33254    #[doc = "ID: 401"]
33255    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33256    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33257    #[doc = ""]
33258    #[doc = "ID: 2"]
33259    SYSTEM_TIME(SYSTEM_TIME_DATA),
33260    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33261    #[doc = ""]
33262    #[doc = "ID: 1"]
33263    SYS_STATUS(SYS_STATUS_DATA),
33264    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33265    #[doc = ""]
33266    #[doc = "ID: 135"]
33267    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33268    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33269    #[doc = ""]
33270    #[doc = "ID: 134"]
33271    TERRAIN_DATA(TERRAIN_DATA_DATA),
33272    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33273    #[doc = ""]
33274    #[doc = "ID: 136"]
33275    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33276    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33277    #[doc = ""]
33278    #[doc = "ID: 133"]
33279    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33280    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33281    #[doc = ""]
33282    #[doc = "ID: 111"]
33283    TIMESYNC(TIMESYNC_DATA),
33284    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33285    #[doc = ""]
33286    #[doc = "ID: 380"]
33287    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33288    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33289    #[doc = ""]
33290    #[doc = "ID: 333"]
33291    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33292    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33293    #[doc = ""]
33294    #[doc = "ID: 332"]
33295    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33296    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33297    #[doc = ""]
33298    #[doc = "ID: 385"]
33299    TUNNEL(TUNNEL_DATA),
33300    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33301    #[doc = ""]
33302    #[doc = "ID: 311"]
33303    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33304    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33305    #[doc = ""]
33306    #[doc = "ID: 310"]
33307    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33308    #[doc = "The global position resulting from GPS and sensor fusion."]
33309    #[doc = ""]
33310    #[doc = "ID: 340"]
33311    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33312    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33313    #[doc = ""]
33314    #[doc = "ID: 248"]
33315    V2_EXTENSION(V2_EXTENSION_DATA),
33316    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33317    #[doc = ""]
33318    #[doc = "ID: 74"]
33319    VFR_HUD(VFR_HUD_DATA),
33320    #[doc = "Vibration levels and accelerometer clipping."]
33321    #[doc = ""]
33322    #[doc = "ID: 241"]
33323    VIBRATION(VIBRATION_DATA),
33324    #[doc = "Global position estimate from a Vicon motion system source."]
33325    #[doc = ""]
33326    #[doc = "ID: 104"]
33327    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33328    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33329    #[doc = ""]
33330    #[doc = "ID: 269"]
33331    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33332    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33333    #[doc = ""]
33334    #[doc = "ID: 270"]
33335    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33336    #[doc = "Local position/attitude estimate from a vision source."]
33337    #[doc = ""]
33338    #[doc = "ID: 102"]
33339    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33340    #[doc = "Speed estimate from a vision source."]
33341    #[doc = ""]
33342    #[doc = "ID: 103"]
33343    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33344    #[doc = "Cumulative distance traveled for each reported wheel."]
33345    #[doc = ""]
33346    #[doc = "ID: 9000"]
33347    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33348    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33349    #[doc = ""]
33350    #[doc = "ID: 299"]
33351    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33352    #[doc = "Winch status."]
33353    #[doc = ""]
33354    #[doc = "ID: 9005"]
33355    WINCH_STATUS(WINCH_STATUS_DATA),
33356    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33357    #[doc = ""]
33358    #[doc = "ID: 231"]
33359    WIND_COV(WIND_COV_DATA),
33360}
33361impl MavMessage {
33362    pub const fn all_ids() -> &'static [u32] {
33363        &[
33364            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33365            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33366            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33367            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33368            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33369            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33370            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33371            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33372            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33373            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33374            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33375            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33376            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33377            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33378            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33379            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33380            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33381            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33382            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33383            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33384            12915u32, 12918u32, 12919u32, 12920u32,
33385        ]
33386    }
33387}
33388impl Message for MavMessage {
33389    fn parse(
33390        version: MavlinkVersion,
33391        id: u32,
33392        payload: &[u8],
33393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33394        match id {
33395            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33396                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33397                    .map(Self::ACTUATOR_CONTROL_TARGET)
33398            }
33399            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33400                .map(Self::ACTUATOR_OUTPUT_STATUS),
33401            ADSB_VEHICLE_DATA::ID => {
33402                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33403            }
33404            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33405            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33406            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33407            ATTITUDE_QUATERNION_DATA::ID => {
33408                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33409            }
33410            ATTITUDE_QUATERNION_COV_DATA::ID => {
33411                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33412                    .map(Self::ATTITUDE_QUATERNION_COV)
33413            }
33414            ATTITUDE_TARGET_DATA::ID => {
33415                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33416            }
33417            ATT_POS_MOCAP_DATA::ID => {
33418                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33419            }
33420            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33421            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33422                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33423                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33424            }
33425            AUTOPILOT_VERSION_DATA::ID => {
33426                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33427            }
33428            AVAILABLE_MODES_DATA::ID => {
33429                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33430            }
33431            AVAILABLE_MODES_MONITOR_DATA::ID => {
33432                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33433                    .map(Self::AVAILABLE_MODES_MONITOR)
33434            }
33435            BATTERY_INFO_DATA::ID => {
33436                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33437            }
33438            BATTERY_STATUS_DATA::ID => {
33439                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33440            }
33441            BUTTON_CHANGE_DATA::ID => {
33442                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33443            }
33444            CAMERA_CAPTURE_STATUS_DATA::ID => {
33445                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33446            }
33447            CAMERA_FOV_STATUS_DATA::ID => {
33448                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33449            }
33450            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33451                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33452            }
33453            CAMERA_INFORMATION_DATA::ID => {
33454                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33455            }
33456            CAMERA_SETTINGS_DATA::ID => {
33457                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33458            }
33459            CAMERA_THERMAL_RANGE_DATA::ID => {
33460                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33461            }
33462            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33463                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33464                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33465            }
33466            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33467                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33468                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33469            }
33470            CAMERA_TRIGGER_DATA::ID => {
33471                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33472            }
33473            CANFD_FRAME_DATA::ID => {
33474                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33475            }
33476            CAN_FILTER_MODIFY_DATA::ID => {
33477                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33478            }
33479            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33480            CELLULAR_CONFIG_DATA::ID => {
33481                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33482            }
33483            CELLULAR_STATUS_DATA::ID => {
33484                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33485            }
33486            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33487                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33488                    .map(Self::CHANGE_OPERATOR_CONTROL)
33489            }
33490            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33491                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33492                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33493            }
33494            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33495            COMMAND_ACK_DATA::ID => {
33496                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33497            }
33498            COMMAND_CANCEL_DATA::ID => {
33499                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33500            }
33501            COMMAND_INT_DATA::ID => {
33502                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33503            }
33504            COMMAND_LONG_DATA::ID => {
33505                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33506            }
33507            COMPONENT_INFORMATION_DATA::ID => {
33508                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33509            }
33510            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33511                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33512                    .map(Self::COMPONENT_INFORMATION_BASIC)
33513            }
33514            COMPONENT_METADATA_DATA::ID => {
33515                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33516            }
33517            CONTROL_SYSTEM_STATE_DATA::ID => {
33518                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33519            }
33520            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33521                .map(Self::CURRENT_EVENT_SEQUENCE),
33522            CURRENT_MODE_DATA::ID => {
33523                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33524            }
33525            DATA_STREAM_DATA::ID => {
33526                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33527            }
33528            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33529                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33530                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33531            }
33532            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33533            DEBUG_FLOAT_ARRAY_DATA::ID => {
33534                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33535            }
33536            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33537            DISTANCE_SENSOR_DATA::ID => {
33538                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33539            }
33540            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33541            ENCAPSULATED_DATA_DATA::ID => {
33542                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33543            }
33544            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33545            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33546            ESTIMATOR_STATUS_DATA::ID => {
33547                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33548            }
33549            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33550            EXTENDED_SYS_STATE_DATA::ID => {
33551                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33552            }
33553            FENCE_STATUS_DATA::ID => {
33554                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33555            }
33556            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33557                .map(Self::FILE_TRANSFER_PROTOCOL),
33558            FLIGHT_INFORMATION_DATA::ID => {
33559                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33560            }
33561            FOLLOW_TARGET_DATA::ID => {
33562                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33563            }
33564            FUEL_STATUS_DATA::ID => {
33565                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33566            }
33567            GENERATOR_STATUS_DATA::ID => {
33568                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33569            }
33570            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33571                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33572                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33573            }
33574            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33575                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33576                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33577            }
33578            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33579                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33580                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33581            }
33582            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33583                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33584                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33585            }
33586            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33587                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33588                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33589            }
33590            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33591                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33592                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33593            }
33594            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33595                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33596                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33597            }
33598            GIMBAL_MANAGER_STATUS_DATA::ID => {
33599                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33600            }
33601            GLOBAL_POSITION_INT_DATA::ID => {
33602                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33603            }
33604            GLOBAL_POSITION_INT_COV_DATA::ID => {
33605                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33606                    .map(Self::GLOBAL_POSITION_INT_COV)
33607            }
33608            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33609                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33610                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33611            }
33612            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33613            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33614            GPS_GLOBAL_ORIGIN_DATA::ID => {
33615                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33616            }
33617            GPS_INJECT_DATA_DATA::ID => {
33618                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33619            }
33620            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33621            GPS_RAW_INT_DATA::ID => {
33622                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33623            }
33624            GPS_RTCM_DATA_DATA::ID => {
33625                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33626            }
33627            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33628            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33629            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33630            HIGHRES_IMU_DATA::ID => {
33631                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33632            }
33633            HIGH_LATENCY_DATA::ID => {
33634                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33635            }
33636            HIGH_LATENCY2_DATA::ID => {
33637                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33638            }
33639            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33640                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33641            }
33642            HIL_CONTROLS_DATA::ID => {
33643                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33644            }
33645            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33646            HIL_OPTICAL_FLOW_DATA::ID => {
33647                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33648            }
33649            HIL_RC_INPUTS_RAW_DATA::ID => {
33650                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33651            }
33652            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33653            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33654            HIL_STATE_QUATERNION_DATA::ID => {
33655                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33656            }
33657            HOME_POSITION_DATA::ID => {
33658                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33659            }
33660            HYGROMETER_SENSOR_DATA::ID => {
33661                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33662            }
33663            ILLUMINATOR_STATUS_DATA::ID => {
33664                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33665            }
33666            ISBD_LINK_STATUS_DATA::ID => {
33667                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33668            }
33669            LANDING_TARGET_DATA::ID => {
33670                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33671            }
33672            LINK_NODE_STATUS_DATA::ID => {
33673                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33674            }
33675            LOCAL_POSITION_NED_DATA::ID => {
33676                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33677            }
33678            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33679                .map(Self::LOCAL_POSITION_NED_COV),
33680            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33681                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33682                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33683            }
33684            LOGGING_ACK_DATA::ID => {
33685                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33686            }
33687            LOGGING_DATA_DATA::ID => {
33688                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33689            }
33690            LOGGING_DATA_ACKED_DATA::ID => {
33691                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33692            }
33693            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33694            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33695            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33696            LOG_REQUEST_DATA_DATA::ID => {
33697                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33698            }
33699            LOG_REQUEST_END_DATA::ID => {
33700                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33701            }
33702            LOG_REQUEST_LIST_DATA::ID => {
33703                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33704            }
33705            MAG_CAL_REPORT_DATA::ID => {
33706                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33707            }
33708            MANUAL_CONTROL_DATA::ID => {
33709                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33710            }
33711            MANUAL_SETPOINT_DATA::ID => {
33712                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33713            }
33714            MEMORY_VECT_DATA::ID => {
33715                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33716            }
33717            MESSAGE_INTERVAL_DATA::ID => {
33718                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33719            }
33720            MISSION_ACK_DATA::ID => {
33721                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33722            }
33723            MISSION_CLEAR_ALL_DATA::ID => {
33724                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33725            }
33726            MISSION_COUNT_DATA::ID => {
33727                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33728            }
33729            MISSION_CURRENT_DATA::ID => {
33730                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33731            }
33732            MISSION_ITEM_DATA::ID => {
33733                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33734            }
33735            MISSION_ITEM_INT_DATA::ID => {
33736                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33737            }
33738            MISSION_ITEM_REACHED_DATA::ID => {
33739                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33740            }
33741            MISSION_REQUEST_DATA::ID => {
33742                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33743            }
33744            MISSION_REQUEST_INT_DATA::ID => {
33745                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33746            }
33747            MISSION_REQUEST_LIST_DATA::ID => {
33748                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33749            }
33750            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33751                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33752                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33753            }
33754            MISSION_SET_CURRENT_DATA::ID => {
33755                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33756            }
33757            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33758                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33759                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33760            }
33761            MOUNT_ORIENTATION_DATA::ID => {
33762                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33763            }
33764            NAMED_VALUE_FLOAT_DATA::ID => {
33765                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33766            }
33767            NAMED_VALUE_INT_DATA::ID => {
33768                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33769            }
33770            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33771                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33772            }
33773            OBSTACLE_DISTANCE_DATA::ID => {
33774                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33775            }
33776            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33777            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33778                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33779                    .map(Self::ONBOARD_COMPUTER_STATUS)
33780            }
33781            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33782                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33783                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33784            }
33785            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33786                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33787                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33788            }
33789            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33790                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33791            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33792                .map(Self::OPEN_DRONE_ID_LOCATION),
33793            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33794                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33795                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33796            }
33797            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33798                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33799                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33800            }
33801            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33802                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33803            }
33804            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33805                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33806            }
33807            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33808                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33809                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33810            }
33811            OPTICAL_FLOW_DATA::ID => {
33812                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33813            }
33814            OPTICAL_FLOW_RAD_DATA::ID => {
33815                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33816            }
33817            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33818                .map(Self::ORBIT_EXECUTION_STATUS),
33819            PARAM_EXT_ACK_DATA::ID => {
33820                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33821            }
33822            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33823                .map(Self::PARAM_EXT_REQUEST_LIST),
33824            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33825                .map(Self::PARAM_EXT_REQUEST_READ),
33826            PARAM_EXT_SET_DATA::ID => {
33827                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33828            }
33829            PARAM_EXT_VALUE_DATA::ID => {
33830                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33831            }
33832            PARAM_MAP_RC_DATA::ID => {
33833                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33834            }
33835            PARAM_REQUEST_LIST_DATA::ID => {
33836                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33837            }
33838            PARAM_REQUEST_READ_DATA::ID => {
33839                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33840            }
33841            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33842            PARAM_VALUE_DATA::ID => {
33843                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33844            }
33845            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33846            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33847            PLAY_TUNE_V2_DATA::ID => {
33848                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33849            }
33850            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33851                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33852                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33853            }
33854            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33855                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33856                    .map(Self::POSITION_TARGET_LOCAL_NED)
33857            }
33858            POWER_STATUS_DATA::ID => {
33859                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33860            }
33861            PROTOCOL_VERSION_DATA::ID => {
33862                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33863            }
33864            RADIO_STATUS_DATA::ID => {
33865                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33866            }
33867            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33868            RAW_PRESSURE_DATA::ID => {
33869                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33870            }
33871            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33872            RC_CHANNELS_DATA::ID => {
33873                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33874            }
33875            RC_CHANNELS_OVERRIDE_DATA::ID => {
33876                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33877            }
33878            RC_CHANNELS_RAW_DATA::ID => {
33879                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33880            }
33881            RC_CHANNELS_SCALED_DATA::ID => {
33882                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33883            }
33884            REQUEST_DATA_STREAM_DATA::ID => {
33885                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33886            }
33887            REQUEST_EVENT_DATA::ID => {
33888                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33889            }
33890            RESOURCE_REQUEST_DATA::ID => {
33891                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33892            }
33893            RESPONSE_EVENT_ERROR_DATA::ID => {
33894                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33895            }
33896            SAFETY_ALLOWED_AREA_DATA::ID => {
33897                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33898            }
33899            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33900                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33901                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33902            }
33903            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33904            SCALED_IMU2_DATA::ID => {
33905                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33906            }
33907            SCALED_IMU3_DATA::ID => {
33908                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33909            }
33910            SCALED_PRESSURE_DATA::ID => {
33911                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33912            }
33913            SCALED_PRESSURE2_DATA::ID => {
33914                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
33915            }
33916            SCALED_PRESSURE3_DATA::ID => {
33917                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
33918            }
33919            SERIAL_CONTROL_DATA::ID => {
33920                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
33921            }
33922            SERVO_OUTPUT_RAW_DATA::ID => {
33923                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
33924            }
33925            SETUP_SIGNING_DATA::ID => {
33926                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
33927            }
33928            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
33929                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33930                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
33931            }
33932            SET_ATTITUDE_TARGET_DATA::ID => {
33933                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
33934            }
33935            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
33936                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
33937            }
33938            SET_HOME_POSITION_DATA::ID => {
33939                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
33940            }
33941            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
33942            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33943                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33944                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
33945            }
33946            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
33947                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33948                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
33949            }
33950            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
33951            SMART_BATTERY_INFO_DATA::ID => {
33952                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
33953            }
33954            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
33955            STORAGE_INFORMATION_DATA::ID => {
33956                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
33957            }
33958            SUPPORTED_TUNES_DATA::ID => {
33959                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
33960            }
33961            SYSTEM_TIME_DATA::ID => {
33962                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
33963            }
33964            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
33965            TERRAIN_CHECK_DATA::ID => {
33966                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
33967            }
33968            TERRAIN_DATA_DATA::ID => {
33969                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
33970            }
33971            TERRAIN_REPORT_DATA::ID => {
33972                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
33973            }
33974            TERRAIN_REQUEST_DATA::ID => {
33975                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
33976            }
33977            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
33978            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
33979                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
33980                    .map(Self::TIME_ESTIMATE_TO_TARGET)
33981            }
33982            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33983                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
33984                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
33985            }
33986            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33987                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
33988                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
33989            }
33990            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
33991            UAVCAN_NODE_INFO_DATA::ID => {
33992                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
33993            }
33994            UAVCAN_NODE_STATUS_DATA::ID => {
33995                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
33996            }
33997            UTM_GLOBAL_POSITION_DATA::ID => {
33998                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
33999            }
34000            V2_EXTENSION_DATA::ID => {
34001                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34002            }
34003            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34004            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34005            VICON_POSITION_ESTIMATE_DATA::ID => {
34006                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34007                    .map(Self::VICON_POSITION_ESTIMATE)
34008            }
34009            VIDEO_STREAM_INFORMATION_DATA::ID => {
34010                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34011                    .map(Self::VIDEO_STREAM_INFORMATION)
34012            }
34013            VIDEO_STREAM_STATUS_DATA::ID => {
34014                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34015            }
34016            VISION_POSITION_ESTIMATE_DATA::ID => {
34017                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34018                    .map(Self::VISION_POSITION_ESTIMATE)
34019            }
34020            VISION_SPEED_ESTIMATE_DATA::ID => {
34021                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34022            }
34023            WHEEL_DISTANCE_DATA::ID => {
34024                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34025            }
34026            WIFI_CONFIG_AP_DATA::ID => {
34027                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34028            }
34029            WINCH_STATUS_DATA::ID => {
34030                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34031            }
34032            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34033            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34034        }
34035    }
34036    fn message_name(&self) -> &'static str {
34037        match self {
34038            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34039            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34040            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34041            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34042            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34043            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34044            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34045            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34046            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34047            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34048            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34049            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34050                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34051            }
34052            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34053            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34054            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34055            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34056            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34057            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34058            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34059            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34060            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34061            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34062            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34063            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34064            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34065            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34066            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34067            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34068            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34069            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34070            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34071            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34072            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34073            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34074            Self::COLLISION(..) => COLLISION_DATA::NAME,
34075            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34076            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34077            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34078            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34079            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34080            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34081            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34082            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34083            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34084            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34085            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34086            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34087            Self::DEBUG(..) => DEBUG_DATA::NAME,
34088            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34089            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34090            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34091            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34092            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34093            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34094            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34095            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34096            Self::EVENT(..) => EVENT_DATA::NAME,
34097            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34098            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34099            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34100            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34101            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34102            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34103            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34104            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34105            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34106            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34107            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34108            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34109            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34110                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34111            }
34112            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34113            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34114            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34115            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34116            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34117            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34118            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34119            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34120            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34121            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34122            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34123            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34124            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34125            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34126            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34127            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34128            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34129            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34130            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34131            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34132            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34133            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34134            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34135            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34136            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34137            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34138            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34139            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34140            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34141            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34142            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34143            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34144            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34145            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34146            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34147                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34148            }
34149            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34150            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34151            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34152            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34153            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34154            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34155            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34156            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34157            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34158            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34159            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34160            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34161            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34162            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34163            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34164            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34165            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34166            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34167            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34168            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34169            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34170            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34171            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34172            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34173            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34174            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34175            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34176            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34177            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34178            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34179            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34180            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34181            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34182            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34183            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34184            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34185            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34186            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34187            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34188            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34189            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34190            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34191            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34192            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34193            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34194            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34195            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34196            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34197            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34198            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34199            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34200            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34201            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34202            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34203            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34204            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34205            Self::PING(..) => PING_DATA::NAME,
34206            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34207            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34208            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34209            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34210            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34211            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34212            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34213            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34214            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34215            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34216            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34217            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34218            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34219            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34220            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34221            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34222            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34223            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34224            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34225            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34226            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34227            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34228            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34229            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34230            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34231            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34232            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34233            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34234            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34235            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34236            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34237            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34238            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34239            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34240            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34241            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34242            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34243            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34244            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34245            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34246            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34247            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34248            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34249            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34250            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34251            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34252            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34253            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34254            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34255            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34256                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34257            }
34258            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34259                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34260            }
34261            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34262            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34263            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34264            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34265            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34266            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34267            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34268            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34269            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34270            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34271            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34272            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34273            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34274            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34275            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34276            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34277        }
34278    }
34279    fn message_id(&self) -> u32 {
34280        match self {
34281            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34282            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34283            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34284            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34285            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34286            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34287            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34288            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34289            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34290            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34291            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34292            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34293                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34294            }
34295            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34296            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34297            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34298            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34299            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34300            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34301            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34302            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34303            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34304            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34305            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34306            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34307            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34308            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34309            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34310            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34311            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34312            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34313            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34314            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34315            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34316            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34317            Self::COLLISION(..) => COLLISION_DATA::ID,
34318            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34319            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34320            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34321            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34322            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34323            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34324            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34325            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34326            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34327            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34328            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34329            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34330            Self::DEBUG(..) => DEBUG_DATA::ID,
34331            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34332            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34333            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34334            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34335            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34336            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34337            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34338            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34339            Self::EVENT(..) => EVENT_DATA::ID,
34340            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34341            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34342            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34343            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34344            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34345            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34346            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34347            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34348            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34349            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34350            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34351            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34352            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34353                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34354            }
34355            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34356            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34357            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34358            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34359            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34360            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34361            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34362            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34363            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34364            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34365            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34366            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34367            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34368            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34369            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34370            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34371            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34372            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34373            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34374            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34375            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34376            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34377            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34378            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34379            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34380            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34381            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34382            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34383            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34384            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34385            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34386            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34387            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34388            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34389            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34390                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34391            }
34392            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34393            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34394            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34395            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34396            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34397            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34398            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34399            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34400            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34401            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34402            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34403            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34404            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34405            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34406            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34407            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34408            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34409            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34410            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34411            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34412            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34413            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34414            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34415            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34416            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34417            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34418            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34419            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34420            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34421            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34422            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34423            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34424            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34425            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34426            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34427            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34428            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34429            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34430            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34431            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34432            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34433            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34434            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34435            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34436            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34437            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34438            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34439            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34440            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34441            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34442            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34443            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34444            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34445            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34446            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34447            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34448            Self::PING(..) => PING_DATA::ID,
34449            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34450            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34451            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34452            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34453            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34454            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34455            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34456            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34457            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34458            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34459            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34460            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34461            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34462            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34463            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34464            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34465            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34466            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34467            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34468            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34469            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34470            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34471            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34472            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34473            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34474            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34475            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34476            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34477            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34478            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34479            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34480            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34481            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34482            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34483            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34484            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34485            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34486            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34487            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34488            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34489            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34490            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34491            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34492            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34493            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34494            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34495            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34496            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34497            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34498            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34499            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34500                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34501            }
34502            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34503            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34504            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34505            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34506            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34507            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34508            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34509            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34510            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34511            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34512            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34513            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34514            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34515            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34516            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34517            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34518        }
34519    }
34520    fn message_id_from_name(name: &str) -> Option<u32> {
34521        match name {
34522            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34523            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34524            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34525            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34526            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34527            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34528            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34529            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34530            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34531            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34532            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34533            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34534                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34535            }
34536            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34537            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34538            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34539            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34540            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34541            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34542            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34543            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34544            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34545            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34546            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34547            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34548            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34549            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34550            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34551            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34552            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34553            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34554            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34555            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34556            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34557            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34558            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34559            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34560            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34561            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34562            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34563            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34564            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34565            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34566            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34567            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34568            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34569            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34570            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34571            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34572            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34573            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34574            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34575            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34576            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34577            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34578            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34579            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34580            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34581            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34582            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34583            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34584            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34585            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34586            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34587            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34588            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34589                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34590            }
34591            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34592            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34593            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34594            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34595            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34596                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34597            }
34598            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34599            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34600            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34601            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34602            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34603                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34604            }
34605            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34606            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34607            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34608            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34609            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34610            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34611            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34612            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34613            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34614            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34615            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34616            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34617            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34618            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34619            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34620            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34621            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34622            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34623            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34624            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34625            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34626            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34627            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34628            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34629            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34630            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34631            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34632            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34633            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34634            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34635                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34636            }
34637            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34638            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34639            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34640            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34641            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34642            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34643            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34644            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34645            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34646            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34647            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34648            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34649            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34650            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34651            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34652            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34653            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34654            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34655            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34656            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34657            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34658            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34659            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34660            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34661            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34662            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34663            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34664            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34665            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34666            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34667            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34668            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34669            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34670            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34671            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34672            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34673            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34674            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34675            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34676            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34677            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34678            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34679            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34680            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34681            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34682            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34683            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34684            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34685            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34686            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34687            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34688            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34689            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34690            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34691            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34692            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34693            PING_DATA::NAME => Some(PING_DATA::ID),
34694            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34695            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34696            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34697            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34698            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34699            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34700            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34701            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34702            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34703            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34704            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34705            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34706            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34707            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34708            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34709            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34710            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34711            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34712            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34713            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34714            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34715            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34716            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34717            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34718            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34719            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34720            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34721            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34722            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34723            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34724            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34725            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34726            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34727            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34728            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34729                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34730            }
34731            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34732                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34733            }
34734            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34735            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34736            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34737            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34738            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34739            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34740            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34741            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34742            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34743            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34744            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34745            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34746            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34747            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34748                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34749            }
34750            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34751                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34752            }
34753            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34754            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34755            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34756            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34757            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34758            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34759            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34760            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34761            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34762            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34763            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34764            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34765            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34766            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34767            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34768            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34769            _ => None,
34770        }
34771    }
34772    fn default_message_from_id(id: u32) -> Option<Self> {
34773        match id {
34774            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34775                ACTUATOR_CONTROL_TARGET_DATA::default(),
34776            )),
34777            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34778                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34779            )),
34780            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34781            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34782            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34783            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34784            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34785                ATTITUDE_QUATERNION_DATA::default(),
34786            )),
34787            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34788                ATTITUDE_QUATERNION_COV_DATA::default(),
34789            )),
34790            ATTITUDE_TARGET_DATA::ID => {
34791                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34792            }
34793            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34794            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34795            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34796                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34797                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34798                ))
34799            }
34800            AUTOPILOT_VERSION_DATA::ID => {
34801                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34802            }
34803            AVAILABLE_MODES_DATA::ID => {
34804                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34805            }
34806            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34807                AVAILABLE_MODES_MONITOR_DATA::default(),
34808            )),
34809            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34810            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34811            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34812            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34813                CAMERA_CAPTURE_STATUS_DATA::default(),
34814            )),
34815            CAMERA_FOV_STATUS_DATA::ID => {
34816                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34817            }
34818            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34819                CAMERA_IMAGE_CAPTURED_DATA::default(),
34820            )),
34821            CAMERA_INFORMATION_DATA::ID => {
34822                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34823            }
34824            CAMERA_SETTINGS_DATA::ID => {
34825                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34826            }
34827            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34828                CAMERA_THERMAL_RANGE_DATA::default(),
34829            )),
34830            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34831                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34832            )),
34833            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34834                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34835            )),
34836            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34837            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34838            CAN_FILTER_MODIFY_DATA::ID => {
34839                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34840            }
34841            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34842            CELLULAR_CONFIG_DATA::ID => {
34843                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34844            }
34845            CELLULAR_STATUS_DATA::ID => {
34846                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34847            }
34848            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34849                CHANGE_OPERATOR_CONTROL_DATA::default(),
34850            )),
34851            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34852                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34853            )),
34854            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34855            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34856            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34857            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34858            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34859            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34860                COMPONENT_INFORMATION_DATA::default(),
34861            )),
34862            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34863                COMPONENT_INFORMATION_BASIC_DATA::default(),
34864            )),
34865            COMPONENT_METADATA_DATA::ID => {
34866                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34867            }
34868            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34869                CONTROL_SYSTEM_STATE_DATA::default(),
34870            )),
34871            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34872                CURRENT_EVENT_SEQUENCE_DATA::default(),
34873            )),
34874            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34875            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34876            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34877                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34878            )),
34879            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34880            DEBUG_FLOAT_ARRAY_DATA::ID => {
34881                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34882            }
34883            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
34884            DISTANCE_SENSOR_DATA::ID => {
34885                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
34886            }
34887            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
34888            ENCAPSULATED_DATA_DATA::ID => {
34889                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
34890            }
34891            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
34892            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
34893            ESTIMATOR_STATUS_DATA::ID => {
34894                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
34895            }
34896            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
34897            EXTENDED_SYS_STATE_DATA::ID => {
34898                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
34899            }
34900            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
34901            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
34902                FILE_TRANSFER_PROTOCOL_DATA::default(),
34903            )),
34904            FLIGHT_INFORMATION_DATA::ID => {
34905                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
34906            }
34907            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
34908            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
34909            GENERATOR_STATUS_DATA::ID => {
34910                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
34911            }
34912            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
34913                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
34914            )),
34915            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
34916                GIMBAL_DEVICE_INFORMATION_DATA::default(),
34917            )),
34918            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
34919                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
34920            )),
34921            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
34922                GIMBAL_MANAGER_INFORMATION_DATA::default(),
34923            )),
34924            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
34925                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
34926            )),
34927            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34928                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
34929                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
34930                ))
34931            }
34932            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
34933                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
34934            )),
34935            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
34936                GIMBAL_MANAGER_STATUS_DATA::default(),
34937            )),
34938            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
34939                GLOBAL_POSITION_INT_DATA::default(),
34940            )),
34941            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
34942                GLOBAL_POSITION_INT_COV_DATA::default(),
34943            )),
34944            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34945                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
34946                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
34947                ))
34948            }
34949            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
34950            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
34951            GPS_GLOBAL_ORIGIN_DATA::ID => {
34952                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
34953            }
34954            GPS_INJECT_DATA_DATA::ID => {
34955                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
34956            }
34957            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
34958            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
34959            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
34960            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
34961            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
34962            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
34963            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
34964            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
34965            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
34966            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
34967                HIL_ACTUATOR_CONTROLS_DATA::default(),
34968            )),
34969            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
34970            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
34971            HIL_OPTICAL_FLOW_DATA::ID => {
34972                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
34973            }
34974            HIL_RC_INPUTS_RAW_DATA::ID => {
34975                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
34976            }
34977            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
34978            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
34979            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
34980                HIL_STATE_QUATERNION_DATA::default(),
34981            )),
34982            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
34983            HYGROMETER_SENSOR_DATA::ID => {
34984                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
34985            }
34986            ILLUMINATOR_STATUS_DATA::ID => {
34987                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
34988            }
34989            ISBD_LINK_STATUS_DATA::ID => {
34990                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
34991            }
34992            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
34993            LINK_NODE_STATUS_DATA::ID => {
34994                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
34995            }
34996            LOCAL_POSITION_NED_DATA::ID => {
34997                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
34998            }
34999            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35000                LOCAL_POSITION_NED_COV_DATA::default(),
35001            )),
35002            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35003                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35004                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35005                ))
35006            }
35007            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35008            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35009            LOGGING_DATA_ACKED_DATA::ID => {
35010                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35011            }
35012            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35013            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35014            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35015            LOG_REQUEST_DATA_DATA::ID => {
35016                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35017            }
35018            LOG_REQUEST_END_DATA::ID => {
35019                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35020            }
35021            LOG_REQUEST_LIST_DATA::ID => {
35022                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35023            }
35024            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35025            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35026            MANUAL_SETPOINT_DATA::ID => {
35027                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35028            }
35029            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35030            MESSAGE_INTERVAL_DATA::ID => {
35031                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35032            }
35033            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35034            MISSION_CLEAR_ALL_DATA::ID => {
35035                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35036            }
35037            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35038            MISSION_CURRENT_DATA::ID => {
35039                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35040            }
35041            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35042            MISSION_ITEM_INT_DATA::ID => {
35043                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35044            }
35045            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35046                MISSION_ITEM_REACHED_DATA::default(),
35047            )),
35048            MISSION_REQUEST_DATA::ID => {
35049                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35050            }
35051            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35052                MISSION_REQUEST_INT_DATA::default(),
35053            )),
35054            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35055                MISSION_REQUEST_LIST_DATA::default(),
35056            )),
35057            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35058                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35059            )),
35060            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35061                MISSION_SET_CURRENT_DATA::default(),
35062            )),
35063            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35064                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35065            )),
35066            MOUNT_ORIENTATION_DATA::ID => {
35067                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35068            }
35069            NAMED_VALUE_FLOAT_DATA::ID => {
35070                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35071            }
35072            NAMED_VALUE_INT_DATA::ID => {
35073                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35074            }
35075            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35076                NAV_CONTROLLER_OUTPUT_DATA::default(),
35077            )),
35078            OBSTACLE_DISTANCE_DATA::ID => {
35079                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35080            }
35081            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35082            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35083                ONBOARD_COMPUTER_STATUS_DATA::default(),
35084            )),
35085            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35086                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35087            )),
35088            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35089                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35090            )),
35091            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35092                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35093            )),
35094            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35095                OPEN_DRONE_ID_LOCATION_DATA::default(),
35096            )),
35097            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35098                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35099            )),
35100            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35101                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35102            )),
35103            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35104                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35105            )),
35106            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35107                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35108            )),
35109            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35110                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35111            )),
35112            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35113            OPTICAL_FLOW_RAD_DATA::ID => {
35114                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35115            }
35116            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35117                ORBIT_EXECUTION_STATUS_DATA::default(),
35118            )),
35119            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35120            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35121                PARAM_EXT_REQUEST_LIST_DATA::default(),
35122            )),
35123            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35124                PARAM_EXT_REQUEST_READ_DATA::default(),
35125            )),
35126            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35127            PARAM_EXT_VALUE_DATA::ID => {
35128                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35129            }
35130            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35131            PARAM_REQUEST_LIST_DATA::ID => {
35132                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35133            }
35134            PARAM_REQUEST_READ_DATA::ID => {
35135                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35136            }
35137            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35138            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35139            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35140            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35141            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35142            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35143                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35144            )),
35145            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35146                POSITION_TARGET_LOCAL_NED_DATA::default(),
35147            )),
35148            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35149            PROTOCOL_VERSION_DATA::ID => {
35150                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35151            }
35152            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35153            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35154            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35155            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35156            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35157            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35158                RC_CHANNELS_OVERRIDE_DATA::default(),
35159            )),
35160            RC_CHANNELS_RAW_DATA::ID => {
35161                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35162            }
35163            RC_CHANNELS_SCALED_DATA::ID => {
35164                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35165            }
35166            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35167                REQUEST_DATA_STREAM_DATA::default(),
35168            )),
35169            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35170            RESOURCE_REQUEST_DATA::ID => {
35171                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35172            }
35173            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35174                RESPONSE_EVENT_ERROR_DATA::default(),
35175            )),
35176            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35177                SAFETY_ALLOWED_AREA_DATA::default(),
35178            )),
35179            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35180                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35181            )),
35182            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35183            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35184            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35185            SCALED_PRESSURE_DATA::ID => {
35186                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35187            }
35188            SCALED_PRESSURE2_DATA::ID => {
35189                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35190            }
35191            SCALED_PRESSURE3_DATA::ID => {
35192                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35193            }
35194            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35195            SERVO_OUTPUT_RAW_DATA::ID => {
35196                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35197            }
35198            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35199            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35200                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35201            )),
35202            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35203                SET_ATTITUDE_TARGET_DATA::default(),
35204            )),
35205            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35206                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35207            )),
35208            SET_HOME_POSITION_DATA::ID => {
35209                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35210            }
35211            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35212            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35213                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35214            )),
35215            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35216                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35217            )),
35218            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35219            SMART_BATTERY_INFO_DATA::ID => {
35220                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35221            }
35222            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35223            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35224                STORAGE_INFORMATION_DATA::default(),
35225            )),
35226            SUPPORTED_TUNES_DATA::ID => {
35227                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35228            }
35229            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35230            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35231            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35232            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35233            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35234            TERRAIN_REQUEST_DATA::ID => {
35235                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35236            }
35237            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35238            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35239                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35240            )),
35241            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35242                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35243                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35244                ))
35245            }
35246            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35247                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35248                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35249                ))
35250            }
35251            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35252            UAVCAN_NODE_INFO_DATA::ID => {
35253                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35254            }
35255            UAVCAN_NODE_STATUS_DATA::ID => {
35256                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35257            }
35258            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35259                UTM_GLOBAL_POSITION_DATA::default(),
35260            )),
35261            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35262            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35263            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35264            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35265                VICON_POSITION_ESTIMATE_DATA::default(),
35266            )),
35267            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35268                VIDEO_STREAM_INFORMATION_DATA::default(),
35269            )),
35270            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35271                VIDEO_STREAM_STATUS_DATA::default(),
35272            )),
35273            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35274                VISION_POSITION_ESTIMATE_DATA::default(),
35275            )),
35276            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35277                VISION_SPEED_ESTIMATE_DATA::default(),
35278            )),
35279            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35280            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35281            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35282            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35283            _ => None,
35284        }
35285    }
35286    #[cfg(feature = "arbitrary")]
35287    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35288        match id {
35289            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35290                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35291            )),
35292            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35293                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35294            )),
35295            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35296            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35297            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35298            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35299            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35300                ATTITUDE_QUATERNION_DATA::random(rng),
35301            )),
35302            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35303                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35304            )),
35305            ATTITUDE_TARGET_DATA::ID => {
35306                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35307            }
35308            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35309            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35310            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35311                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35312                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35313                ))
35314            }
35315            AUTOPILOT_VERSION_DATA::ID => {
35316                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35317            }
35318            AVAILABLE_MODES_DATA::ID => {
35319                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35320            }
35321            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35322                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35323            )),
35324            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35325            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35326            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35327            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35328                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35329            )),
35330            CAMERA_FOV_STATUS_DATA::ID => {
35331                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35332            }
35333            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35334                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35335            )),
35336            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35337                CAMERA_INFORMATION_DATA::random(rng),
35338            )),
35339            CAMERA_SETTINGS_DATA::ID => {
35340                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35341            }
35342            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35343                CAMERA_THERMAL_RANGE_DATA::random(rng),
35344            )),
35345            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35346                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35347            )),
35348            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35349                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35350            )),
35351            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35352            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35353            CAN_FILTER_MODIFY_DATA::ID => {
35354                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35355            }
35356            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35357            CELLULAR_CONFIG_DATA::ID => {
35358                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35359            }
35360            CELLULAR_STATUS_DATA::ID => {
35361                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35362            }
35363            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35364                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35365            )),
35366            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35367                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35368            )),
35369            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35370            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35371            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35372            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35373            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35374            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35375                COMPONENT_INFORMATION_DATA::random(rng),
35376            )),
35377            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35378                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35379            )),
35380            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35381                COMPONENT_METADATA_DATA::random(rng),
35382            )),
35383            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35384                CONTROL_SYSTEM_STATE_DATA::random(rng),
35385            )),
35386            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35387                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35388            )),
35389            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35390            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35391            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35392                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35393            )),
35394            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35395            DEBUG_FLOAT_ARRAY_DATA::ID => {
35396                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35397            }
35398            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35399            DISTANCE_SENSOR_DATA::ID => {
35400                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35401            }
35402            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35403            ENCAPSULATED_DATA_DATA::ID => {
35404                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35405            }
35406            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35407            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35408            ESTIMATOR_STATUS_DATA::ID => {
35409                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35410            }
35411            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35412            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35413                EXTENDED_SYS_STATE_DATA::random(rng),
35414            )),
35415            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35416            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35417                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35418            )),
35419            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35420                FLIGHT_INFORMATION_DATA::random(rng),
35421            )),
35422            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35423            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35424            GENERATOR_STATUS_DATA::ID => {
35425                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35426            }
35427            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35428                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35429            )),
35430            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35431                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35432            )),
35433            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35434                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35435            )),
35436            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35437                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35438            )),
35439            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35440                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35441            )),
35442            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35443                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35444                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35445                ))
35446            }
35447            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35448                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35449            )),
35450            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35451                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35452            )),
35453            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35454                GLOBAL_POSITION_INT_DATA::random(rng),
35455            )),
35456            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35457                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35458            )),
35459            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35460                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35461                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35462                ))
35463            }
35464            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35465            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35466            GPS_GLOBAL_ORIGIN_DATA::ID => {
35467                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35468            }
35469            GPS_INJECT_DATA_DATA::ID => {
35470                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35471            }
35472            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35473            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35474            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35475            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35476            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35477            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35478            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35479            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35480            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35481            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35482                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35483            )),
35484            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35485            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35486            HIL_OPTICAL_FLOW_DATA::ID => {
35487                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35488            }
35489            HIL_RC_INPUTS_RAW_DATA::ID => {
35490                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35491            }
35492            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35493            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35494            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35495                HIL_STATE_QUATERNION_DATA::random(rng),
35496            )),
35497            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35498            HYGROMETER_SENSOR_DATA::ID => {
35499                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35500            }
35501            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35502                ILLUMINATOR_STATUS_DATA::random(rng),
35503            )),
35504            ISBD_LINK_STATUS_DATA::ID => {
35505                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35506            }
35507            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35508            LINK_NODE_STATUS_DATA::ID => {
35509                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35510            }
35511            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35512                LOCAL_POSITION_NED_DATA::random(rng),
35513            )),
35514            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35515                LOCAL_POSITION_NED_COV_DATA::random(rng),
35516            )),
35517            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35518                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35519                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35520                ))
35521            }
35522            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35523            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35524            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35525                LOGGING_DATA_ACKED_DATA::random(rng),
35526            )),
35527            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35528            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35529            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35530            LOG_REQUEST_DATA_DATA::ID => {
35531                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35532            }
35533            LOG_REQUEST_END_DATA::ID => {
35534                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35535            }
35536            LOG_REQUEST_LIST_DATA::ID => {
35537                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35538            }
35539            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35540            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35541            MANUAL_SETPOINT_DATA::ID => {
35542                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35543            }
35544            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35545            MESSAGE_INTERVAL_DATA::ID => {
35546                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35547            }
35548            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35549            MISSION_CLEAR_ALL_DATA::ID => {
35550                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35551            }
35552            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35553            MISSION_CURRENT_DATA::ID => {
35554                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35555            }
35556            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35557            MISSION_ITEM_INT_DATA::ID => {
35558                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35559            }
35560            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35561                MISSION_ITEM_REACHED_DATA::random(rng),
35562            )),
35563            MISSION_REQUEST_DATA::ID => {
35564                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35565            }
35566            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35567                MISSION_REQUEST_INT_DATA::random(rng),
35568            )),
35569            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35570                MISSION_REQUEST_LIST_DATA::random(rng),
35571            )),
35572            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35573                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35574            )),
35575            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35576                MISSION_SET_CURRENT_DATA::random(rng),
35577            )),
35578            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35579                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35580            )),
35581            MOUNT_ORIENTATION_DATA::ID => {
35582                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35583            }
35584            NAMED_VALUE_FLOAT_DATA::ID => {
35585                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35586            }
35587            NAMED_VALUE_INT_DATA::ID => {
35588                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35589            }
35590            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35591                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35592            )),
35593            OBSTACLE_DISTANCE_DATA::ID => {
35594                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35595            }
35596            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35597            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35598                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35599            )),
35600            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35601                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35602            )),
35603            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35604                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35605            )),
35606            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35607                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35608            )),
35609            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35610                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35611            )),
35612            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35613                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35614            )),
35615            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35616                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35617            )),
35618            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35619                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35620            )),
35621            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35622                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35623            )),
35624            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35625                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35626            )),
35627            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35628            OPTICAL_FLOW_RAD_DATA::ID => {
35629                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35630            }
35631            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35632                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35633            )),
35634            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35635            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35636                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35637            )),
35638            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35639                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35640            )),
35641            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35642            PARAM_EXT_VALUE_DATA::ID => {
35643                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35644            }
35645            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35646            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35647                PARAM_REQUEST_LIST_DATA::random(rng),
35648            )),
35649            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35650                PARAM_REQUEST_READ_DATA::random(rng),
35651            )),
35652            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35653            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35654            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35655            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35656            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35657            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35658                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35659            )),
35660            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35661                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35662            )),
35663            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35664            PROTOCOL_VERSION_DATA::ID => {
35665                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35666            }
35667            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35668            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35669            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35670            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35671            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35672            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35673                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35674            )),
35675            RC_CHANNELS_RAW_DATA::ID => {
35676                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35677            }
35678            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35679                RC_CHANNELS_SCALED_DATA::random(rng),
35680            )),
35681            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35682                REQUEST_DATA_STREAM_DATA::random(rng),
35683            )),
35684            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35685            RESOURCE_REQUEST_DATA::ID => {
35686                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35687            }
35688            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35689                RESPONSE_EVENT_ERROR_DATA::random(rng),
35690            )),
35691            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35692                SAFETY_ALLOWED_AREA_DATA::random(rng),
35693            )),
35694            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35695                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35696            )),
35697            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35698            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35699            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35700            SCALED_PRESSURE_DATA::ID => {
35701                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35702            }
35703            SCALED_PRESSURE2_DATA::ID => {
35704                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35705            }
35706            SCALED_PRESSURE3_DATA::ID => {
35707                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35708            }
35709            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35710            SERVO_OUTPUT_RAW_DATA::ID => {
35711                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35712            }
35713            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35714            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35715                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35716            )),
35717            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35718                SET_ATTITUDE_TARGET_DATA::random(rng),
35719            )),
35720            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35721                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35722            )),
35723            SET_HOME_POSITION_DATA::ID => {
35724                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35725            }
35726            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35727            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35728                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35729            )),
35730            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35731                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35732            )),
35733            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35734            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35735                SMART_BATTERY_INFO_DATA::random(rng),
35736            )),
35737            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35738            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35739                STORAGE_INFORMATION_DATA::random(rng),
35740            )),
35741            SUPPORTED_TUNES_DATA::ID => {
35742                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35743            }
35744            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35745            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35746            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35747            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35748            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35749            TERRAIN_REQUEST_DATA::ID => {
35750                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35751            }
35752            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35753            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35754                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35755            )),
35756            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35757                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35758                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35759                ))
35760            }
35761            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35762                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35763                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35764                ))
35765            }
35766            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35767            UAVCAN_NODE_INFO_DATA::ID => {
35768                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35769            }
35770            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35771                UAVCAN_NODE_STATUS_DATA::random(rng),
35772            )),
35773            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35774                UTM_GLOBAL_POSITION_DATA::random(rng),
35775            )),
35776            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35777            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35778            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35779            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35780                VICON_POSITION_ESTIMATE_DATA::random(rng),
35781            )),
35782            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35783                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35784            )),
35785            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35786                VIDEO_STREAM_STATUS_DATA::random(rng),
35787            )),
35788            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35789                VISION_POSITION_ESTIMATE_DATA::random(rng),
35790            )),
35791            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35792                VISION_SPEED_ESTIMATE_DATA::random(rng),
35793            )),
35794            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35795            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35796            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35797            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35798            _ => None,
35799        }
35800    }
35801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35802        match self {
35803            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35804            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35805            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35806            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35807            Self::ALTITUDE(body) => body.ser(version, bytes),
35808            Self::ATTITUDE(body) => body.ser(version, bytes),
35809            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35810            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35811            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35812            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35813            Self::AUTH_KEY(body) => body.ser(version, bytes),
35814            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35815            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35816            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35817            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35818            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35819            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35820            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35821            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35822            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35823            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35824            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35825            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35826            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35827            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35828            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35829            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35830            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35831            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35832            Self::CAN_FRAME(body) => body.ser(version, bytes),
35833            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35834            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35835            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35836            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35837            Self::COLLISION(body) => body.ser(version, bytes),
35838            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35839            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35840            Self::COMMAND_INT(body) => body.ser(version, bytes),
35841            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35842            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35843            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35844            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35845            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35846            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35847            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35848            Self::DATA_STREAM(body) => body.ser(version, bytes),
35849            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35850            Self::DEBUG(body) => body.ser(version, bytes),
35851            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35852            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35853            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35854            Self::EFI_STATUS(body) => body.ser(version, bytes),
35855            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35856            Self::ESC_INFO(body) => body.ser(version, bytes),
35857            Self::ESC_STATUS(body) => body.ser(version, bytes),
35858            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35859            Self::EVENT(body) => body.ser(version, bytes),
35860            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35861            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35862            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35863            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35864            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35865            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35866            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
35867            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
35868            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
35869            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
35870            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
35871            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
35872            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
35873            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
35874            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
35875            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
35876            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
35877            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35878            Self::GPS2_RAW(body) => body.ser(version, bytes),
35879            Self::GPS2_RTK(body) => body.ser(version, bytes),
35880            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35881            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
35882            Self::GPS_INPUT(body) => body.ser(version, bytes),
35883            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
35884            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
35885            Self::GPS_RTK(body) => body.ser(version, bytes),
35886            Self::GPS_STATUS(body) => body.ser(version, bytes),
35887            Self::HEARTBEAT(body) => body.ser(version, bytes),
35888            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
35889            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
35890            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
35891            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
35892            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
35893            Self::HIL_GPS(body) => body.ser(version, bytes),
35894            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
35895            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
35896            Self::HIL_SENSOR(body) => body.ser(version, bytes),
35897            Self::HIL_STATE(body) => body.ser(version, bytes),
35898            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
35899            Self::HOME_POSITION(body) => body.ser(version, bytes),
35900            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
35901            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
35902            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
35903            Self::LANDING_TARGET(body) => body.ser(version, bytes),
35904            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
35905            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
35906            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
35907            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
35908            Self::LOGGING_ACK(body) => body.ser(version, bytes),
35909            Self::LOGGING_DATA(body) => body.ser(version, bytes),
35910            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
35911            Self::LOG_DATA(body) => body.ser(version, bytes),
35912            Self::LOG_ENTRY(body) => body.ser(version, bytes),
35913            Self::LOG_ERASE(body) => body.ser(version, bytes),
35914            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
35915            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
35916            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
35917            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
35918            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
35919            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
35920            Self::MEMORY_VECT(body) => body.ser(version, bytes),
35921            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
35922            Self::MISSION_ACK(body) => body.ser(version, bytes),
35923            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
35924            Self::MISSION_COUNT(body) => body.ser(version, bytes),
35925            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
35926            Self::MISSION_ITEM(body) => body.ser(version, bytes),
35927            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
35928            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
35929            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
35930            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
35931            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
35932            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
35933            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
35934            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
35935            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
35936            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
35937            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
35938            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
35939            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
35940            Self::ODOMETRY(body) => body.ser(version, bytes),
35941            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
35942            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
35943            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
35944            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
35945            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
35946            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
35947            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
35948            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
35949            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
35950            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
35951            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
35952            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
35953            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
35954            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
35955            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
35956            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
35957            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
35958            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
35959            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
35960            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
35961            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
35962            Self::PARAM_SET(body) => body.ser(version, bytes),
35963            Self::PARAM_VALUE(body) => body.ser(version, bytes),
35964            Self::PING(body) => body.ser(version, bytes),
35965            Self::PLAY_TUNE(body) => body.ser(version, bytes),
35966            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
35967            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
35968            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
35969            Self::POWER_STATUS(body) => body.ser(version, bytes),
35970            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
35971            Self::RADIO_STATUS(body) => body.ser(version, bytes),
35972            Self::RAW_IMU(body) => body.ser(version, bytes),
35973            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
35974            Self::RAW_RPM(body) => body.ser(version, bytes),
35975            Self::RC_CHANNELS(body) => body.ser(version, bytes),
35976            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
35977            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
35978            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
35979            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
35980            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
35981            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
35982            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
35983            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
35984            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
35985            Self::SCALED_IMU(body) => body.ser(version, bytes),
35986            Self::SCALED_IMU2(body) => body.ser(version, bytes),
35987            Self::SCALED_IMU3(body) => body.ser(version, bytes),
35988            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
35989            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
35990            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
35991            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
35992            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
35993            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
35994            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35995            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
35996            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35997            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
35998            Self::SET_MODE(body) => body.ser(version, bytes),
35999            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36000            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36001            Self::SIM_STATE(body) => body.ser(version, bytes),
36002            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36003            Self::STATUSTEXT(body) => body.ser(version, bytes),
36004            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36005            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36006            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36007            Self::SYS_STATUS(body) => body.ser(version, bytes),
36008            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36009            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36010            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36011            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36012            Self::TIMESYNC(body) => body.ser(version, bytes),
36013            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36014            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36015            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36016            Self::TUNNEL(body) => body.ser(version, bytes),
36017            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36018            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36019            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36020            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36021            Self::VFR_HUD(body) => body.ser(version, bytes),
36022            Self::VIBRATION(body) => body.ser(version, bytes),
36023            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36024            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36025            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36026            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36027            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36028            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36029            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36030            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36031            Self::WIND_COV(body) => body.ser(version, bytes),
36032        }
36033    }
36034    fn extra_crc(id: u32) -> u8 {
36035        match id {
36036            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36037            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36038            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36039            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36040            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36041            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36042            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36043            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36044            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36045            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36046            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36047            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36048                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36049            }
36050            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36051            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36052            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36053            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36054            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36055            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36056            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36057            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36058            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36059            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36060            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36061            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36062            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36063            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36064            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36065            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36066            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36067            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36068            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36069            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36070            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36071            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36072            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36073            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36074            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36075            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36076            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36077            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36078            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36079            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36080            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36081            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36082            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36083            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36084            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36085            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36086            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36087            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36088            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36089            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36090            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36091            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36092            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36093            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36094            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36095            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36096            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36097            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36098            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36099            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36100            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36101            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36102            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36103            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36104            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36105            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36106            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36107            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36108                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36109            }
36110            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36111            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36112            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36113            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36114            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36115                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36116            }
36117            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36118            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36119            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36120            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36121            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36122            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36123            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36124            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36125            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36126            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36127            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36128            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36129            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36130            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36131            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36132            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36133            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36134            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36135            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36136            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36137            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36138            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36139            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36140            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36141            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36142            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36143            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36144            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36145            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36146            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36147                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36148            }
36149            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36150            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36151            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36152            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36153            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36154            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36155            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36156            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36157            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36158            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36159            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36160            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36161            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36162            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36163            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36164            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36165            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36166            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36167            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36168            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36169            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36170            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36171            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36172            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36173            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36174            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36175            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36176            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36177            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36178            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36179            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36180            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36181            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36182            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36183            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36184            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36185            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36186            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36187            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36188            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36189            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36190            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36191            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36192            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36193            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36194            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36195            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36196            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36197            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36198            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36199            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36200            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36201            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36202            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36203            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36204            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36205            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36206            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36207            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36208            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36209            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36210            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36211            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36212            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36213            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36214            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36215            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36216            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36217            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36218            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36219            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36220            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36221            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36222            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36223            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36224            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36225            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36226            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36227            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36228            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36229            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36230            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36231            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36232            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36233            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36234            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36235            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36236            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36237            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36238            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36239            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36240            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36241                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36242            }
36243            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36244            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36245            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36246            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36247            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36248            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36249            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36250            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36251            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36252            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36253            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36254            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36255            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36256            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36257            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36258                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36259            }
36260            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36261                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36262            }
36263            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36264            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36265            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36266            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36267            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36268            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36269            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36270            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36271            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36272            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36273            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36274            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36275            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36276            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36277            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36278            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36279            _ => 0,
36280        }
36281    }
36282    fn target_system_id(&self) -> Option<u8> {
36283        match self {
36284            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36285            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36286            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36287            Self::CAN_FRAME(inner) => Some(inner.target_system),
36288            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36289            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36290            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36291            Self::COMMAND_INT(inner) => Some(inner.target_system),
36292            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36293            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36294            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36295            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36296            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36297            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36298            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36299            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36300            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36301            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36302            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36303            Self::LOG_ERASE(inner) => Some(inner.target_system),
36304            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36305            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36306            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36307            Self::MISSION_ACK(inner) => Some(inner.target_system),
36308            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36309            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36310            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36311            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36312            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36313            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36314            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36315            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36316            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36317            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36318            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36319            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36320            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36321            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36322            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36323            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36324            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36325            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36326            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36327            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36328            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36329            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36330            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36331            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36332            Self::PARAM_SET(inner) => Some(inner.target_system),
36333            Self::PING(inner) => Some(inner.target_system),
36334            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36335            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36336            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36337            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36338            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36339            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36340            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36341            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36342            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36343            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36344            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36345            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36346            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36347            Self::SET_MODE(inner) => Some(inner.target_system),
36348            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36349            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36350            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36351            Self::TIMESYNC(inner) => Some(inner.target_system),
36352            Self::TUNNEL(inner) => Some(inner.target_system),
36353            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36354            _ => None,
36355        }
36356    }
36357    fn target_component_id(&self) -> Option<u8> {
36358        match self {
36359            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36360            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36361            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36362            Self::CAN_FRAME(inner) => Some(inner.target_component),
36363            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36364            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36365            Self::COMMAND_INT(inner) => Some(inner.target_component),
36366            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36367            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36368            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36369            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36370            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36371            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36372            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36373            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36374            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36375            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36376            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36377            Self::LOG_ERASE(inner) => Some(inner.target_component),
36378            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36379            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36380            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36381            Self::MISSION_ACK(inner) => Some(inner.target_component),
36382            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36383            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36384            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36385            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36386            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36387            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36388            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36389            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36390            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36391            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36392            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36393            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36394            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36395            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36396            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36397            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36398            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36399            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36400            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36401            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36402            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36403            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36404            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36405            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36406            Self::PARAM_SET(inner) => Some(inner.target_component),
36407            Self::PING(inner) => Some(inner.target_component),
36408            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36409            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36410            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36411            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36412            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36413            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36414            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36415            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36416            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36417            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36418            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36419            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36420            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36421            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36422            Self::TIMESYNC(inner) => Some(inner.target_component),
36423            Self::TUNNEL(inner) => Some(inner.target_component),
36424            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36425            _ => None,
36426        }
36427    }
36428}